> This is a big YES! Actually, it's a big no. Alex, immediately and correctly pointed out that what is needed in a suffix rather than a separator and the way to get that is with a generator expression: f.writelines(x+'\n' for x in mylines). I had been led astray because I was experimenting with using cStringIO.writelines() as a basis for implementing str.join() for general iterables without creating an intermediate tuple. Right now, ''.join(it) will unexpectedly consume much more memory than really needed. Raymond Hettinger
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4