Python type cast 💱

Описание к видео Python type cast 💱

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)

Комментарии

Информация по комментариям в разработке