17
Question Assertion (A): In Python, a variable can hold values of different types at different times.
Reason (R): Once assigned, a variable's data type remains fixed throughout the program.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
A is true but R is false.
Explanation
In Python, variables are dynamically typed, so they can hold values of different types at different times. This means that a variable's data type is not fixed once assigned, and Python allows changing the type of a variable during the program's execution.