Question 1
Back to Exercise
After a = [1, 2] and a.append([3, 4]), what is len(a)?
- A 3 Correct
- B 4
- C 2
- D TypeError
Correct Answer: Option A
append adds its argument as a single item, so a is [1, 2, [3, 4]]. extend([3, 4]) would give length 4.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!