Test Index

Python Revision Tour Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 91 of 102
Marks: +1, -0
Which of the following is not a sequential datatype in Python ?
[CBSE 2023 Compartment]
Solution:  
Concept:
A sequence data type stores items in a fixed order, and each item has an index 0, 1, 2, ... (indexing and slicing work on it).
Explanation:
String, list and tuple are sequences: S[0], L[1:3] etc. work on them.
A dictionary stores key : value pairs. Its items are reached by key, not by position, and it cannot be sliced, so it is a mapping type, not a sequence.
Answer:
Option A (Dictionary)
© examsnet.com
Advertisements
Go to Question: