If the interpreter can't parse your Python code successfully, then this means that you used invalid syntax somewhere in your code. The interpreter will attempt to show you where that error occurred. When you're learning Python for the first time, it can be frustrating to get a SyntaxError .
The print() function prints the specified message to the screen, or other standard output device. The message can be a string, or any other object, the object will be converted into a string before written to the screen.
In Python 3, print is a function, you need to call it like print("hello world")
.
Use print("use this bracket -sample text")
In Python 3 print "Hello world"
gives invalid syntax error.
To display string content in Python3 have to use this ("Hello world")
brackets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With