← Quiz: References and Copying: all 10 questions
Quiz: References and Copying · Question 2 of 10
What does this print? (code)
What does this print?
x = [1, 2]
y = [1, 2]
print(x == y, x is y)
- A.True True
- B.False False
- C.True False
- D.False True
Answer & explanation
Correct answer: True False
The values are equal, but they are two separate list objects.
Can you get the rest right without peeking?
Take the timed Quiz: References and Copying quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →