3 ms·
It is a scoping problem IMO. In JavaScript variables are block-scoped, i will be out of scope after the loop. It would be better if Python could support block-
by maxloh 4y ago
It is a scoping problem IMO. In JavaScript variables are block-scoped, i will be out of scope after the loop.
It would be better if Python could support block-scoping too. (Maybe it is time for inventing a "strict mode" for Python)