[Tutor] nested loops

Ashley F aflint310 at yahoo.com
Mon Feb 7 16:33:22 CET 2011


I am trying to write a function...(it's kind of like a long way to do BLAST but only comparing 2 sequences)
 
I have 3 loops nested...Within those loops, I obtain a "best fit score" so to speak.
 
I can get the program to run...but the loops run all the way to the end.  I can't figure out how to print the best score found...and the alignment that went with it. (therefore, my results will only be correct if my last alignment is the highest scoring one--which it usually isn't)
 
To try to clear this up...
The part of my pseudocode that I'm having trouble putting into actual code in python is:
"if that alignment has the best score seen so far
     save the score and that alignment"


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110207/90379410/attachment.html>


More information about the Tutor mailing list