Assignment vs. Equality
After this, score is 101. This would be nonsense in math (100 = 101?), but in programming it makes perfect sense: "Take the current value of score, add 1, store the result back in score." So How Do I Check Equality? Assignment stores a value: The first returns True ("Is x equal to 5?" Yes!). The second returns False. Using the correct operator in conditions: Confusing = with == is one of the most common beginner bugs. In Python, assignment always flows right to left: the value on the right is stored into the variable on the left. Every time you write a condition in an if-statement or while-loop, you need == to compare. Every time you store a value, you need =. With practice, this distinction becomes automatic.
About This Interactive Section
This section is part of the Python Expressions: Beginner lesson on DataDriven, a free data engineering interview prep platform. Each section includes explanations, worked examples, and hands-on code challenges that execute in real time. SQL queries run against a live PostgreSQL database. Python runs in a sandboxed Docker container. Data modeling problems validate against interactive schema canvases. All content is framed around what data engineering interviewers actually test at companies like Meta, Google, Amazon, Netflix, Stripe, and Databricks.
How DataDriven Lessons Work
DataDriven combines four interview rounds (SQL, Python, Data Modeling, Pipeline Architecture) with adaptive difficulty and spaced repetition. Easy problems get harder as you improve. Weak concepts resurface until you master them. Your readiness score tracks progress across every topic interviewers test. Every lesson section ends with problems you solve by writing and running real code, not by picking multiple-choice answers.