Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to specify variable type in python

x = "20"
y = 5.7
z = 90
print(type(x))
print(type(y))
print(type(z))
a = int(x)
b = str(y)
c = float(z)
print(type(a))
print(type(b))
print(type(c))
 
PREVIOUS NEXT
Tagged: #variable #type #python
ADD COMMENT
Topic
Name
4+6 =