Nested For Loop Grid Python