>I'm still not sure what was stopping the inner >loop from working earlier - but removing the redundancy in "j=0" and so >on seems to have solved it.
Call me crazy, but be careful when programming python in different text editors and in general, ie cutting and pasting, tabing and spacing. Loops can look fine and not work (try moving around test print statements for iterators), in this case try re-tabing your indents so that everything is uniform in the editor you are using. -- http://mail.python.org/mailman/listinfo/python-list