Python program to print the typecasting int string and float value

A Python program to print the typecasting int string and float value. In this program we can print the type cast the value in python. The integer literal is specified using int(). Using a text literal and Float, create an integer number. The string literal is specified via str(). Create a string type from either an integer or a float literal. The float data types are specified with float().

x = str(3) 
y = int(3)
z = float(3)
print(x)
print(y)
print(z)

 

Output:

3

3

3.0