Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "After a = [1], b = a, and b.append(2), what is a?" on CodeWiki (https://codewiki.com/practice/mcq/python/checkpoint-1/checkpoint-1-name-binding/).
Context (verbatim from the page):
"""
After a = [1], b = a, and b.append(2), what is a?
[1, 2], because both names refer to the same list
[1], because assignment copies a list
It is undefined because b replaced a
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Python. Where you are unsure, say so.