If you are watching this video, you probably just got this Unbound Local error message in Python. But why does it happen and how can you fix it? In this video you learn two solutions to the problem.
C H A P T E R S
0:10 Python can access variables outside of the function
0:45 Scoping rules
1:30 The cause of an UnboundLocalError
2:40 Quick fix with the global keyword
3:25 Decouple the function to solve the problem
M Y O N L I N E T R A I N I N G
🎓Like my style of teaching? Try free chapters of online courses: https://pythonforeveryone.com
L I N K S I N T H E V I D E O
https://docs.python.org/3/faq/program...
#unbound #local #error
Смотрите видео UnboundLocalError: cannot access local variable 'x' where it is not associated with a value онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Python for Everyone 04 Август 2023. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 4,983 раз и оно понравилось 71 посетителям.