CBSE Class 11 Computer Science Question 73 of 114

Tuples — Question 10

Back to all questions
10
Question

Question 1(j)

Find the output generated by following code fragments :

T5 = (17,)	  
type(T5)
Answer
Output
<class 'tuple'> 
Explanation

Since 17 is enclosed in parenthesis and a comma is added after it, so T5 becomes a single element tuple instead of an integer.