Skip to content Skip to sidebar Skip to footer

Python 3.3: Separation Argument (sep) Giving An Error

I am very new to programming and I'm starting out with Python. I tried to look up my question here but didn't really find anything. I'm trying to work a very simple print command

Solution 1:

You aren't actually using Python 3, you just think you are. Try:

import sys
print(sys.version)

and see what comes out. The Python 2 print ... statement (not print(...) function in Python 3) interprets this as

print (first.capitalize(), middle.capitalize(), last.capitalize(), sep='\t')

which is trying to print a tuple with a keyword argument, thus the syntax error on sep

Post a Comment for "Python 3.3: Separation Argument (sep) Giving An Error"