When stuck, reduce the scope of your problem. If your loop fails to process a list of 1,000 items, test it with a list of two items. Eliminate variables until you find the exact point of failure. Translating Logic into Python
Think Like a Programmer, Python Edition " by V. Anton Spraul is a specialized version of his original best-selling book, adapted specifically for the Python programming language think like a programmer python edition pdf