"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
-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
"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))
>
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
"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