0
Whatâs this error
File "./Playground/file0.py", line 1 >>>"""Customer: Good morning.\nOwner: Good morning, Sir. Welcome to the National Cheese Emporium.""" ^ SyntaxError: invalid syntax
2 RĂ©ponses
+ 3
Just do this:
print(type your code written above here)
Expected output:
Customer: Good morning.
Owner: Good morning, Sir. Welcome to the National Cheese Emporium.
+ 2
The ">>>" has never to be typed (unless you want explicitly to type it inside a string, obviously)
That's not a valid python operator, that's just the "prompt" sign show to the user in the Python interactive shell (it's like internaly there was an input(">>>")).
When you encouter it in examples/tutos, it means you could type what's next after it in a shell (or sligthly have to adapt to let it work in a script execution context, as suggested by Prabhat Ranjan: in a shell, just typing a variable name or a literal value then pressing enter would log its value -- implicit print -- but in a running script, to log them, you need to explicitly call the print function ;))
Ho!
Obviously, code running in code playground are like saved script file that you run in an OS shell (terminal) ^^