Re:WTF Python: Exploring and understanding Python through su...
by pansa2 on Thursday February 11, 2021 @04:57AM
(#26099867)
Yes - in many languages x is a new variable on each iteration of the loop. Python re-uses the same variable each time, because the loop does not have its own scope.
[ Parent
| on HN ]
There are no comments on this comment yet.