Lesson 5: Master Assignment Operators | Python Beginner Course 2025 🐍

 


    In this lesson, we'll learn about assignment operators in python. They are pretty similar to arithmetic operators so make sure to check out that lesson too. Below are a list of the basic assignment operators in python.


+= This operator adds to a value

-= This operator subtracts from a value

*= This operator multiplies a value

**= This operator performs exponentiation on a value

/= This operator divides a value

//= This operator floor divides a value

%= this operator performs the modulo function on a value


Here is an example

Input:

x = 2
x **= 3print(x)

Output:

9