Combining Lists and Tupels

Martin P martin_p at despammed.com
Thu May 22 08:14:06 EDT 2003


Hello,

for an exercise I have to programm a python script
which sorts name, family names and addresses from a csv-File.
The csv-File looks like this:

familyname;name;street;house-number;town-code;town

I did it like this:

f=open("test.csv")

try:
    while 1:
            currentline=f.readline()
            data=string.split(currentline, ";")

            address=data[2], data[3], data[4]
            list[i]=data[0], data[1], address
            i+=1
finally:
    print "test error"


But this does not work. I think my problem is with the combination of the
list[i] and the Tupel address.




Thanks a lot for help,


bye,

Martin






More information about the Python-list mailing list