0

What is type conversion?

I am writing the same code in python 3.6.0 shell as sololearn taught me but I am not gettjng the same answer as in sololearn instead I am getting error. please help me in understanding.

20th Feb 2017, 11:25 AM
Ali Hassan
Ali Hassan - avatar
2 ответов
+ 5
It means changing the data type of the value of the variable. It's called being mutable or immutable
20th Feb 2017, 2:55 PM
Chirag Bhansali
Chirag Bhansali - avatar
+ 1
This code changes the variable type 3 times: num = 8765772 print("hello i am a",type(num),"variable") print("now i am a",type(str(num)),"variable") print("now i am a",type(float(num)),"variable")
25th Feb 2017, 2:10 AM
Jay
Jay - avatar