Discussion
Which of the given options best describes the truthfulness of the following statements?
i) A tuple is a sequence of immutable Python objects, in the given tuple course = "l", "m", "n", "o", has four elements.
ii) To explicitly remove an entire tuple, use the drop statement.
Answer: C
Statement i is true and statement ii is false. A tuple is a sequence of immutable Python objects, and the tuple course with "l", "m", "n" and "o" has four elements. To remove an entire tuple explicitly, Python uses the del statement, and there is no drop statement for this, so statement ii is false. So the third option is correct. Items can still be removed from a tuple only by building a new one, because a tuple cannot be changed after it is made.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development