[Tutor] triple-nested for loop not working
Andre Engels
andreengels at gmail.com
Thu May 5 09:22:37 CEST 2011
I have not checked the rest of your code, but:
> for line in seqalign:
> for i in len(finalmotif_seqs): # for item in finalmotif_seqs:
> for i in len(finalmotif_annot): # for item in finalmotif_annot:
I see two problems here:
1. You are using the same loop variable in both loops here. That's
likely to cause problems
2. You let the loops go over len(finalmotif_seqs).
len(finalmotif_seqs) is a number, and you can't loop over a number.
You should use the form as you write after the #.
--
André Engels, andreengels at gmail.com
More information about the Tutor
mailing list