http://inventwithpython.com
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
On Fri, Nov 13, 2009 at 2:17 PM, biboy mendz bibsmen...@gmail.com wrote:
http://inventwithpython.com
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
biboy mendz bibsmen...@gmail.com 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:
Hugo Arts hugo.yo...@gmail.com wrote
print letter, ' ',
You don't need the space, Python automatically inserts
a space instead of the newline when you use the comma.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/l2p/
thanks a lot for the clarification Alan and all.
--
Regards,
bibs M.
Host/Kernel/OS cc02695 running Linux 2.6.31-5.slh.4-sidux-686
[sidux 2009-02 Αιθήρ - kde-full - (200907141427) ]
www.sidux.com
Alan Gauld wrote:
biboy mendz bibsmen...@gmail.com wrote
chapter 8: hangman.py