Python Assignment

Assignment in Python

In Python, the assignment operator allows us to bind a name we've created to a Python object. This can be any sort of object in Python, and allows us to use our new name to reference the object.

 new_name = 12
# new_name now points to the value 12

other_name = "this is a string"
# assignment can be used for any Python type,
# not just numbers

We use this commonly in Python to store data for later in our program, with a name that's easy to remember and easy for those reading our code to understand.