Python Nested Function Use Outer Variable Decelerations