96.0k views
3 votes
Which of the following is NOT true about a Python variable?

a) A Python variable must have a value

b) A Python variable can be deleted

c) The lifetime of a Python variable is the whole duration of a program execution.

d) A Python variable can have the value None.

User Timo Ernst
by
4.6k points

2 Answers

5 votes

Answer:

The lifetime of a Python variable is the whole duration of a program execution.

User Wojjas
by
4.5k points
2 votes

Answer: c) The lifetime of a Python variable is the whole duration of a program execution.

Explanation: Python variable are variables that are made up of alpha-numeric characters and underscores only.They also persist the case sensitivity.The life time of the variable is python is dependent upon scope of python variables.

It can have value that should start with underscore or letter and no number.It can be deleted as per requirement .But the life of variable does not depends on programs execution duration.Thus, the only incorrect statement given in the question is option(c).

User Matoe
by
4.7k points