I have a strange error using sep
, file
, (etc.) arguments of python's print()
function.
I tried to google it out, dag around stackoverflow, and read python's documentation but I came up with nothing.
I have attached a simple snippet, I would deeply appreciate any help.
# python
Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("blah"*10, sep=" | ")
File "<stdin>", line 1
print("blah"*10, sep=" | ")
^
SyntaxError: invalid syntax
Try:
from __future__ import print_function
first
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