On 22 January 2012 20:57, Michael Poeltl <michael.poe...@univie.ac.at>wrote:

> > Two iterations.  And since that is the only possible way to do this, you
> > are correct, the language is terribly archaic.  I suggest you switch to
> > Ruby ASAP.
> why there is only one possibility to do so? in a second i found this
> ''.join(open('test').readlines()).split('\n')
>
> and if you don't like python, then stick to ruby. who cares???


I'm pretty sure that was sarcasm, but as was said before ".readlines()" is
superfluous and the original comment was wrong.

''.join(open('test').readlines()).split('\n')
==
''.join(open('test')).split('\n')
==
open('test').read().split('\n')
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to