I have a Dictionary, that is made up of keys which are email
addresses, and values which are a list of firstname, lastnamet,
address, etc...
If I run the following:
#! /bin/python
import csv
last = {}
rdr = csv.DictReader(file("reg-data.csv"))
for row in rdr:
#print row
last[row["reg-email"]] =
[row["reg-last"],row["reg-first"],row["reg-country"],row["reg-address"],row["reg-institution"],row["reg-phone"],row["reg-subject"],row["reg-abstract"],row["reg-category"],row["reg-speaking"],row["reg-travel"],row["reg-abstract-upload"],row["reg-rec"]]
print last['[EMAIL PROTECTED]'][0]
# print records
for k,v in last:
print "Email: %s , has the Last name: %s" % (k,v[0])
I get the error indicated in the subject:
ValueError: too many values to unpack
Any ideas? Thanks!
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor