Answers for "python define type variable"

1

type de variable python

a=int(5)
b=float(5.6)
c=str("Hello world!")
Posted by: Guest on February-24-2020
0

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))
Posted by: Guest on December-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language