# Show the multiplication trap: create wrong = [[0] * 3] * 3, set wrong[0][0] = 1, and print wrong

Canonical URL: <https://datadriven.io/problems/show-the-multiplication-trap-create-wrong-0-3-3-ae6f9b9e>

Domain: Python · Difficulty: medium

## Problem

Show the multiplication trap: create wrong = [[0] * 3] * 3, set wrong[0][0] = 1, and print wrong. Then create right = [[0] * 3 for _ in range(3)], set right[0][0] = 1, and print right.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/show-the-multiplication-trap-create-wrong-0-3-3-ae6f9b9e)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.