How would you modify the code to fix these counter functions? Go!

Subscribers:
2,520,000
Published on ● Video Link: https://www.youtube.com/watch?v=380uq314UBM



Duration: 0:00
17,046 views
282


Python developers, this function creates two counter functions that share state in an unexpected way. Can you predict the output and explain why it happens? More importantly, how would you modify the code to create truly independent counters? Share your thoughts in the comments!

Subscribe to Google for Developers β†’ https://goo.gle/developers

Speakers: Crystal Endless