
About the author
Mallikarjuna Mallisetty
General programming
Mallikarjuna shares practical programming tutorials and foundational concepts designed to help developers learn by building and experimenting.
View LinkedIn profile ↗Watch an idea take shape. Try a different input. Check what you understand.
New to Python? Start with Foundations. You can switch anytime.
No account or installation needed. Your progress stays on this device.
Your learning path
Your progress is saved on this device.
Estimated time includes reading, exploring code and answering quizzes. Learn at your own pace.
No lessons found. Try another keyword.
Follow the highlighted line, see the values change, then predict the output.
Choose a sample and follow its execution. Guided simulation.
total = 10
total = total + 2
shopping_list = ["tea"]
basket = shopping_list
basket.append("milk")
print(total)
print(shopping_list)Top-level scope
12Object 3 · list['tea', 'milk']The example has finished. Compare the final output with the values and references above.
12 ['tea', 'milk']
What do you expect this program to print?