Global variable in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
5th Dec 2022, 2:40 PM
Abisekapriyan s U19cs0003
Abisekapriyan s U19cs0003 - avatar
1 Answer
+ 4
What is your question? In case you are trying to use the global x inside of the function, you need to specify global x in the beginning of the function.
5th Dec 2022, 3:27 PM
Lisa
Lisa - avatar