Question 5
Back to Exercise
Which method does print([p]) use to show the object p inside the list?
- A __str__
- B __repr__ Correct
- C __format__
- D __print__
Correct Answer: Option B
Containers show their items with repr(); print(p) on its own uses __str__.
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!