The lifetime of a variable is determined by its _______ in the code.

  • assignment
  • data type
  • declaration
  • scope
The lifetime of a variable in Python is determined by its scope in the code. Variables can have different scopes, such as local, enclosing, global, or built-in, which affect their lifespan.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *