Type casting refers to the conversion of one data type to another. In Python, you can cast variables from one type to another using built-in functions.
Integer to Float:
x = 10
y = float(x)
print(y) # Output: 10.0
Type casting refers to the conversion of one data type to another. In Python, you can cast variables from one type to another using built-in functions.
Integer to Float:
x = 10
y = float(x)
print(y) # Output: 10.0