KnowledgeBoat Logo

Computer Science

Find the output generated by following code fragments :

T5 = (17,)	  
type(T5)

Python Tuples

1 Like

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.

Answered By

2 Likes


Related Questions