Python Nested For Loop Error Truth Value Ambiguous Stack Overflow

Python Nested For Loop Error Truth Value Ambiguous Stack Overflow