The given declaration statement in Python Language belongs to which data type?…
2021
The given declaration statement in Python Language belongs to which data type? >>> Student = {'SUBJECT' : 'Compiler', 'Marks' : '50', 'Grade' : 'C'}
- A.
Numbers
- B.
Sequence
- C.
Sets
- D.
Dictionary
Attempted by 2100 students.
Show answer & explanation
Correct answer: D
The given declaration uses curly braces {} with key-value pairs separated by colons, such as 'SUBJECT' : 'Compiler'. This syntax is used in Python to define a dictionary, where each key is associated with a value. Dictionaries are mutable and allow access to values using keys. This structure is not used for numbers, sequences, or sets.