[Tutor] Tutor Digest, Vol 32, Issue 49
alan.gauld at btinternet.com
Fri Oct 13 11:09:04 CEST 2006
"Meher Kolli" <meherkp at gmail.com> wrote in message
> You can't add \n to a string ..up have use something like this
> if str == 'q':
> done = 1
> fd.write("%s \n" %(str))
What makes you think so?
>>> s = 'l'
>>> s += '\n'
Seems to work.... '\n' is just a character like any other.
Author of the Learn to Program web site
More information about the Tutor