declare int in python code example
Example 1: python variable
string = 'string'
integer = 5
boolean = True
Example 2: python declare int
x = 5
print(type(x))
# Output: <class 'int'>
Example 3: variables in python
x = 5
y = "John"
print(x)
print(y)
Example 4: Use variables in python
x = 'Welcome'
print(x)
Example 5: declare float python
myfloat = 7.0
Example 6: python cvariables
x = 7 #sets int as x
y = "John"# sets the string as y
print(x)#prints x
print(y)# prints y