how to define variable type in python code example
Example 1: python variable
Python variable
Example 2: python declare int
x = 5
print(type(x))
# Output: <class 'int'>
Example 3: declare float python
myfloat = 7.0
Example 4: python cvariables
x = 7 #sets int as x
y = "John"# sets the string as y
print(x)#prints x
print(y)# prints y