Re: [Tutor] Difference between for i in range(len(object)) and for i in object

2004-12-09 Thread Jeff Shannon
kumar s wrote: > Here is my code: spot_cor=[] Create an empty list... for m in cor: Now, for each element in some other list from somewhere else, ... cols = split(cor,'\t') Ignore the element we've just isolated and try to split the entire list on '\t' ... Traceback (most recent call last):

Re: [Tutor] Difference between for i in range(len(object)) and for i in object

2004-12-09 Thread Bob Gailer
At 09:50 AM 12/9/2004, kumar s wrote: [snip] Personally I am getting weary of a lot of requests that to me seem to come from a lack of understanding of Python.. Would you be willing to take a good tutorial so you understand basic Python concepts and apply them to your code. I also despair that

RE: [Tutor] Difference between for i in range(len(object)) and for i in object

2004-12-09 Thread Robert, Andrew
Good morning Kumar, I believe you need to do something like: # # Read from command line supplied input file # for line in open(sys.argv[1]).xreadlines(): # # Remove \n from end of line # line=line[:-1] # # Break line by tab delimiter