KnowledgeBoat Logo

Class - 12 CBSE Computer Science Important Output Questions 2025

Predict the output.

tuple_a = 'a', 'b'  
tuple_b = ('a',  'b')  
print (tuple_a == tuple_b)  

Python Tuples

12 Likes

Answer

Output
True
Explanation

Tuples can be declared with or without parentheses (parentheses are optional). Here, tuple_a is declared without parentheses where as tuple_b is declared with parentheses but both are identical. As both the tuples contain same values so the equality operator ( == ) returns true.

Answered By

9 Likes