> Here is my code:
> >>> spot_cor=[]
> >>> for m in cor:
> ... cols = split(cor,'\t')
You are splitting the list not the item
cols = split(m, '\t')
Better to use a meaningful name too:
for line in cor:
would probably have made the mistake more obvious.
> However, when I tried that using some data, as
> demonstrated above, I get error because append method
No its the spil method that doesn't exist and that
was because you were passing the list instead of
the object.
Once you get used to the "foreach" semantics of "for"
it really is a better way of working than messing
around with indexes.
Alan G.
_______________________________________________
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor