Nested loop

viewcharts Tollens at gmail.com
Tue Nov 29 15:00:46 EST 2005


I am reading two text files comparing the values in one to the other, 
this requires two loops. The problem is that when the inner loop is 
finished, it never goes back into the loop. Any suggestions?


for refSymbol in symbols.readlines():
    for lookupSymbol in myfile.readlines(): 
        showme = lookupSymbol.split('\t')
        if showme[3] == refSymbol.strip():
            priceNew.write(refSymbol.strip()+" "+showme[10])






More information about the Python-list mailing list