Question 1
Back to Exercise
Which expression creates a tuple containing only the number 5?
- A (5)
- B tuple(5)
- C [5]
- D (5,) Correct
Correct Answer: Option D
The comma makes the tuple. (5) is just 5, tuple(5) is a TypeError (an int is not iterable), and [5] is a list.
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!