see: https://teklern.blogspot.com/p/blog-p...
Please subscribe.
Teaching: How python functions can 'remember' values, similar to C language static locals.
Problem: random sequence that does not repeat locally as function inc()
Solution: use function object attribute
On this page of the site you can watch the video online How to do static function variables in Python with a duration of hours minute second in good quality, which was uploaded by the user Professor Gerry Jenkins 16 February 2018, share the link with friends and acquaintances, this video has already been watched 3,640 times on youtube and it was liked by 40 viewers. Enjoy your viewing!