Python | Namespaces and Scope Quiz | Question 3

Last Updated :
Discuss
Comments

What is the lifetime of a local variable in Python?

Until the program ends

Until the function it is defined in ends

Throughout the entire program

Until explicitly deleted using del keyword

Share your thoughts in the comments