KnowledgeBoat Logo

Computer Science

Find the output generated by following code fragments :

T4 = (17)  
type(T4)

Python Tuples

1 Like

Answer

Output
<class 'int'>  
Explanation

Since no comma is added after the element, so even though it is enclosed in parenthesis still it will be treated as an integer, hence T4 stores an integer not a tuple.

Answered By

1 Like


Related Questions