Variables In Python

variables in python
Simple terms: a variable is a box that you can put stuff in it such as
strings int booleans
Python Variables
name=input('What is your name')
email=input('what is your email')
print(f"Hi {name}! We will be contacting you shortly at {email}")
how to create a variable in python
variable1 = "Hello"
variable2 = 13
variable3 = False
how to create a variable in python
myVar = "Hello this is a variable!")
# Prints "Hello this is a variable!"
how to make a variable in python
integer = 4 #int
string = "STRING" #string
boolean = True #Boolean. Can set it to False, too
how do variables work in python
#Set a variable equal to something
variable = 0
#This adds 1 to the variable
variable += 1
#This will print 1

Leave a Comment