On Feb 12, 12:47 pm, "mech point" <[EMAIL PROTECTED]> wrote: > I was able to read the data from file into a two dimensional array > (lists) > > rows=[map(float,line.split())for line in file("data")] > > but How to write them back into the file.
Presuming that it is either mandatory to adopt the same style (or lack thereof) as the input code, and/or futile to suggest otherwise: file('data2','w').write('\n'.join(' '.join(repr(item)for item in row)for row in rows)+'\n') -- http://mail.python.org/mailman/listinfo/python-list