Certified Associate in Python Programming (PCAP) — Question 54
Which of the following sentences are true? (Choose two.)
Answer options
- A. Lists may not be stored inside tuples
- B. Tuples may be stored inside lists
- C. Tuples may not be stored inside tuples
- D. Lists may be stored inside lists
Correct answer: B, D
Explanation
Option B is correct because tuples can be elements of lists in Python. Option D is also correct since lists can contain other lists as elements. Options A and C are incorrect because lists can actually be contained within tuples and tuples can contain other tuples.