Writelines() a bit confusing
aiwarrior
zubeido at yahoo.com.br
Sat May 19 08:36:35 EDT 2007
If file.WriteLines( seq ) accepts a list and it says it writes lines,
why does it write the whole list in a single line. Be cause of that
the reverse of file.writelines(seq) is not file.readlines().
Are the assumptions i made correct? If yes why is this so?
I find a function called writelines not actualy writing the list in
lines wierd.
[code]
something = ['re','ri','ro']
f.writelines( something )
something_else = f.readlines()
[/code]
In this case the list something_else will be diffrent from something
More information about the Python-list
mailing list