In this example we will show how to change the type of a variable after it has been set in Python.
Source Code
var1 = 20 # var1 is of type int
print(var1)
var1 = '20' # var1 is now of type str
print(var1)
var1 = 'python' # var1 is re-assigned
print(var1)
Output:
20
20
python