Ich habe einen seltsamen Fehler mit sep
, file
, (usw.) Argumente von Python print()
Funktion. Ich habe versucht, es googeln, dag around stackoverflow, und lesen python's documentation, aber ich kam mit nichts. Ich habe ein einfaches Snippet beigefügt, ich würde jede Hilfe sehr schätzen.Python 2.7 print() Fehler
# 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
danke dir. Es hat das Problem gelöst. Wie kommt es also, Python-Dokumentation (siehe meine Update-Post) anders angibt? und, wissen Sie, wo ich die relevante Dokumentation für native Verwendung der 'print()' Funktion finde? – MrRoth
@MrRoth: Lesen Sie die Notiz auf Ihrem Link;) – phant0m
@MrRoth Sie sollten dies als die Antwort akzeptieren. – Ash