Search⌘ K
AI Features

Assignment Operators

Explore assignment operators in Python to understand how they assign values to variables. Discover basic and multiple assignments, and learn how variable values can be modified independently.

We have already been using the assignment operator in previous lessons. Assignment operators are used to assign values to variables. The most basic assignment operator is =, which assigns the value on the right to the variable on the left. The right-hand side of an assignment does not need to be a variable; it can be any expression or value.

Python 3.10.4
left_variable = right_variable

Assigning values

Let’s go through a few examples to see how values are ...