Which of the following is a Python Tuple?

By: Prof. Dr. Fazal Rehman | Last updated: February 3, 2024

(A) (7, 8, 9) (B) [7, 8, 9] (C) {} (D) {7, 8, 9} Correct Answer: (A). (7, 8, 9)

Python program to Create a Tuple

Output () (4, 5, 9) (1, ‘Hello’, 3.4) (‘T4Tutorials’, [3, 1, 6], (7, 8, 2))
Which of the following are legal Python Tuples? (A). a tuple with mixed datatypes (B). nested tuple (C). (4, 5, 9) (D). All of these Correct Answer: (D). All of these
Which of the following operator is used to access an item in a tuple, where the index starts from 0? (A). [ ] (B). ( ) (C). { } (D). None of these Correct Answer: (A). [ ]

Computer Science MCQs

All Copyrights Reserved 2025 Reserved by T4Tutorials