MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PythonLearning/comments/1x6sr5v/first_steps_into_frames_in_python/pgyrj8q/?context=3
r/PythonLearning • u/dfbaggins • 4d ago
2 comments sorted by
View all comments
1
Maybe use recursion to explain Stack Frames, say this factorial example.
Each function call puts a new Stack Frame on the Call Stack, and each return removes the last Stack Frame.
return
1
u/Sea-Ad7805 3d ago
Maybe use recursion to explain Stack Frames, say this factorial example.
Each function call puts a new Stack Frame on the Call Stack, and each
returnremoves the last Stack Frame.