Python type cast conversion tutorial explained
#Python #type #cast
#type casting = convert the data type of a value to another data type.
x = 1 #int
y = 2.0 #float
z = "3" #str
x = int(x)
y = int(y)
z = int(z)
x = float(x)
y = float(y)
z = float(z)
x = str(x)
y = str(y)
z = str(z)
print(x)
print(y)
print(z*3)
#Python #type #cast
#type casting = convert the data type of a value to another data type.
x = 1 #int
y = 2.0 #float
z = "3" #str
x = int(x)
y = int(y)
z = int(z)
x = float(x)
y = float(y)
z = float(z)
x = str(x)
y = str(y)
z = str(z)
print(x)
print(y)
print(z*3)
- Category
- Bro Code
- Tags
- python, beginner python, tutorial series

Be the first to comment