Dayrvia
Py

Python · Shallow copies · Practice questions

Try 2 questions on Python · Shallow copies, then read the explanations and review the related concepts.

Practice questions

Choose an answer and move to the next question. Grade the last one to see explanations and review links.

2 questions
Q1 What is len(a)?
a = [1, 2]
b = a
b.append(3)
Q2 What does a contain?
a = [[2]]
b = a.copy()
b[0].append(3)
Original practice questions written for Dayrvia.