New to python. Trying not to be a help vampire.
Things I've learned since joining stack overflow:
Watch your () and , especially if you use a lot of lists. That might be why you're getting this weird error no one else got.
Screwing up ranges can cause weird outputs if you put it through a bunch of other loops. Make sure to test each loop separately, instead of screaming in terror when your program does something strange.
Q&A for professional and enthusiast programmers
Q&A for computer enthusiasts and power users
Q&A for meta-discussion of the Stack Exchange family of Q&A websites