CBSE Class 11 Informatics Practices Question 6 of 66

Dictionary — Question 6

Back to all questions
6
Question

Question 6

Assertion (A): Items in dictionaries are unordered.

Reasoning (R): You may not get back the data in the same order in which you had entered the data initially in the dictionary.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
In Python, items in dictionaries are unordered. Dictionaries do not maintain the order of elements as they are inserted. When retrieving data from a dictionary, the order of elements returned may not match the order in which they were inserted.