Skip to content

Python Assignment Operators

  • = assign something to a variable
  • += add then assign to variable num +=2
  • -= subtract then assign to variable num -=2
  • *= multiply
  • /= divide
  • **= exponent
  • %= modulus

python

pythonassignmentoperators