Test Index
Python Revision Tour
© examsnet.com
Question : 71 of 102
Marks:
+1,
-0
For the following Python statement :
N = (25)What shall be the type of N ?
[CBSE 2024 Compartment]
Solution:
Concept:Parentheses around a single value only group it; they do not make a tuple. A one-element tuple needs a trailing comma.Explanation:
>>> N = (25)>>> type(N)<class 'int'>>>> N = (25,)>>> type(N)<class 'tuple'>So
N = (25) is just the integer 25, and the type of N is Integer.Answer:Option A (Integer)© examsnet.com
Go to Question: