[Tutor] multiple assignments when reading a file

Sivaram Neelakantan nsivaram.net at gmail.com
Thu Jul 11 05:24:14 CEST 2013


I'm aware of 

var1, var2  = lines.split()

kind of assignments

How do I get to do

x1..xn = lines.split()

instead of typing out n var names?  Is there some pythonic way to map
all the data fields automagically given a starter var?  

I have dataset that's got 100s of fields and I really don't want to
type them out.

 sivaram
 -- 



More information about the Tutor mailing list