"biboy mendz" <[email protected]> wrote

chapter 8: hangman.py

expression is: print(letter, end=' ')

it explained:
end keyword argument in print() call makes the print() function put a space
character at the end of the string instead of a newline.

however when run it gives error: SyntaxError: invalid syntax.

What gives? This is the first time i saw such expression inside print
function. Is this version-specific of python? I'm running version 2.5.4.

Your tutorial is using version 3.
In 2.6 simply put a comma after the string:

print letter,

to do the same thing.

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to