how to define variables in python code example

Example 1: declaring variables in python

my_name = "your name here "# you can add perenthisis
print(my_name)

Example 2: variables in python

#Variables
#Name your variable

myvar = 'Variable'
Number = 9

print(myvar, Number, 'are the variables I made')

Example 3: python variable

string = 'string'
integer = 5
boolean = True

Example 4: python declare int

x = 5

print(type(x))
# Output: <class 'int'>

Example 5: variables in python

x = 5
y = "John"
print(x)
print(y)

Example 6: Use variables in python

x = 'Welcome'
print(x)

Tags:

Sql Example