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.
2 Réponses
+ 5
It means changing the data type of the value of the variable. It's called being mutable or immutable
+ 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")