Emile van Sebille <[EMAIL PROTECTED]> wrote:
>data = zip(*[xx.split() for xx in open('data.txt').read().split("\n")])
Files are iterable:
data = zip(*[xx.rstrip().split() for xx in open('data.txt')])
saves you creating the extra intermediate list resulting from split("\n").
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
--
http://mail.python.org/mailman/listinfo/python-list