Skip to content
Skip to resources
peazit

What do you want to understand today?

PEAZIT Aha card

Python: assignment is not an equation

Go straight to resources ↓

First evaluate the right side, then bind the name on the left to that value.

Lines run from top to bottom.
LineValue of x afterwards
x = 22
x = x + 35

One worked example

  1. x = 2The name x now refers to 2.
  2. x = x + 3The right side evaluates 2 + 3; x then refers to 5.

Watch out: In Python, = assigns and == compares. This example uses integers; shared mutable objects require further care.

Goal, prerequisites and card origin

What you will learn: Track a variable through successive assignments.

What you need first: A variable as a name for a value; addition.

An original PEAZIT working card. Independent expert review and effectiveness testing have not yet taken place. · v1

Show connections

First evaluate the right side, then bind the name on the left to that value.

Other options for this topic

Catalogue

Read
MIT OpenCourseWareEN

Lecture 1 Video Solutions | Introduction to Computer Science and Programming in Python | Electrical Engineering and Computer Science | MIT OpenCourseWare

Learning resource “Lecture 1 Video Solutions | Introduction to Computer Science and Programming in Python | Electrical Engineering and Computer Science | MIT OpenCourseWare” from MIT OpenCourseWare. Opens on the provider’s website.

About this resource

Topic assigned automatically · Record updated: 2026-10-07

Find your own way. Resources open directly on their authors’ websites. Order reflects search relevance, not a teaching-quality rating.

47,636 resources to explore

15 independent sources

3 resource languages

EXPLORE / EN

Where will curiosity take you?

Start with a subject. Then find your way.

All topics
peazit

Everyone learns differently. Find your way.

Saved

For your next aha.

Your saved links stay in this browser.