Deborah Swanson wrote:
flds = len(ls[0])
cl, ur, d1, de, lo, st, mi, ki, re, da, br, no, yn, ma, ar =
range(0,flds)

You might like to consider converting the row into a
namedtuple, then you could refer to the fields using
attribute names instead of indexes.

You could even use the header row to set up the field
names in the namedtuple, so if you reorder the columns
in the file, the code would automatically adapt.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to