se qualcosa sta andando male, si può sempre provare a chiedere aiuto:
>>> help(print)
Help on built-in function print in module builtins:
print(...)
print(value, ..., sep=' ', end='\n', file=sys.stdout)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline.
e ci si potrebbe vedere, tha la sintassi di quella print
cosa è print(something)
buffa è che in Python 2, si ottiene solo un messaggio di errore:
>>> help(print)
SyntaxError: invalid syntax
è perché in python < 3, print
funzione non era una funzione, ma una parola chiave (proprio come per es. for
o or
)
Vedere [ errore di sintassi python su stampa ] (http://stackoverflow.com/questions/826948/python-syntax-error-on-print). –
Installa Python 2.7 (o leggi la documentazione) –