Easy question

Phlip phlip_cpp at my-deja.com
Wed Apr 11 16:02:07 EDT 2001


Duncan Smith wrote:

> I need to read some data from a file.  Each (tab delimited) row
> corresponds to an array index eg.

list = eval('[' + join(split(join(split('''0    0    0    0    0    0
0    1    0    0    0    0
0    0    1    0    0    0''', '\t'), ', '), '\n'), '],[') + ']')

This is from my forth-coming book "Python for Perl Users". Not.

-- 
  Phlip                          phlip_cpp at my-deja.com
============== http://phlip.webjump.com ==============
This signature was automatically generated with
Signify v1.06.  For this and other cool products,
check out http://www.debian.org/



More information about the Python-list mailing list