PYTHON CIRCLE
Practice
Python Books
Archive
Subscribe
Login
Menu
Login
Practice
Python Books
Archive
Subscribe
Blog available for sell
This blog is available for sale. Please 'contact us' if interested.
Advertise with us
Python Multiple Choice Questions
What happens if a local variable exists with the same name as the global variable you want to access?
A. Error
B. The local variable is shadowed
C. Undefined behavior
D. The global variable is shadowed
Show Answer
Next Question
Correct Answer:
D
Explanation: If a local variable exists with the same name as the local variable that you want to access, then the global variable is shadowed. That is, preference is given to the local variable.
© 2024-2025 Python Circle
Contact
Sponsor
Archive
Sitemap