Bulba! wrote: > motivation). I've tried to manipulate the data just in Python > and not in typical loops. One thing that may not be entirely
A list comprehension is just a fancy way to write a loop. Resisting the temptation to use it can sometimes improve your code. > [Also, for some reason the advice by another poster, to > use: > > oldl=list(orig) > > instead of: > > oldl=[x for x in orig] > > ..somehow didn't work. The first instruction has produced only empty > lists.] > > > #---------Code follows----------- [...] > #oldl=list(orig) > #newl=list(orig) Because you used the same reader twice newl will always be empty. Peter -- http://mail.python.org/mailman/listinfo/python-list