Assignment operator

TheΒ 
'='
Β 
operatorΒ 
isΒ 
knownΒ 
asΒ 
assignmentΒ 
operator,Β 
alsoΒ 
readΒ 
asΒ 
'isΒ 
setΒ 
to'
.

Assignment statement

AΒ 
lineΒ 
ofΒ 
theΒ 
programΒ 
thatΒ 
assignsΒ 
aΒ 
valueΒ 
toΒ 
aΒ 
variable.
variable = value
# the value is stored in the variable
count = 5
print(count)

Math vs Python "="

InΒ 
mathematics,Β 
=
Β 
meansΒ 
toΒ 
equateΒ 
theΒ 
leftΒ 
sideΒ 
withΒ 
theΒ 
rightΒ 
side.
InΒ 
python,Β 
=
Β 
symbolΒ 
isΒ 
usedΒ 
toΒ 
setΒ 
theΒ 
value
Β 
ofΒ 
theΒ 
leftΒ 
sideΒ 
variableΒ 
toΒ 
theΒ 
rightΒ 
sideΒ 
variable.
variable = value
# the value is stored in the variable
variable = variable + value
# value is added to existing variable value and stored in the variable
count = 5
count = count + 2
# new value of count is set to old value of count + 2
print(count)