Python functions created inside loops often return the same value because closures capture a variable, not a snapshot of its value. This behavior is known as late binding. When the loop finishes, all functions reference the final value of the loop variable.
Source: [HackerNoon](https://hackernoon.com/why-your-python-loops-are-creating-the-wrong-functions?source=rss)