Re: nested tuples

2005-09-10 Thread Terry Reedy
"Luis P. Mendes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > | Why? What is it about the list of tuples that you don't like? > | Philosophically, it's more in line with Guido's separation of list and > | tuple. > I'm not saying that I don't like, I was just curious to know if t

Re: nested tuples

2005-09-10 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | | Why? What is it about the list of tuples that you don't like? | Philosophically, it's more in line with Guido's separation of list and | tuple. I'm not saying that I don't like, I was just curious to know if there was a way to do it using exclusi

Re: nested tuples

2005-09-09 Thread Tim Roberts
"Luis P. Mendes" <[EMAIL PROTECTED]> wrote: > >I'm trying to solve this problem: > >suppose I'm reading a csv file and want to create a tuple of all those >rows and values, like ((row1value1, row1value2, row1value3),(row2value1, >row2value2, row2value3),..., (rowNvalue1, rowNvalue2, rowNvalue3)) >

Re: nested tuples

2005-09-09 Thread Larry Bates
The first question is why do you need tuples? But this works: import csv filename=r'C:\test.txt' fp=open(filename,'r') reader=csv.reader(fp) tlines=tuple([tuple(x) for x in reader]) fp.close() Larry Bates Luis P. Mendes wrote: > Hi, > > I'm trying to solve this problem: > > suppose I'm readin

Re: nested tuples

2005-09-09 Thread Max Erickson
"Luis P. Mendes" <[EMAIL PROTECTED]> wrote in > suppose I'm reading a csv file and want to create a tuple of all > those rows and values, like ((row1value1, row1value2, > row1value3),(row2value1, row2value2, row2value3),..., > (rowNvalue1, rowNvalue2, rowNvalue3)) > > I haven't found the way to d