C-16-Q010mediumsingle_mcq
Which statement about Python variables is true?
Which statement about Python variables is true?
- aThe data type must always be declared first
- bThe data type cannot be changed once set
- cIt is not necessary to cite the data type, and it can be changed any time
- dOnly int variables are allowed
ব্যাখ্যা
In Python, variables are dynamically typed: you never declare a type, and the same variable can be reassigned to a value of a different type at any time. The interpreter infers the type from the value currently assigned.