Informatics Practices

Assertion (A): Dictionary is a collection of key-value pairs.

Reasoning (R): Each key in a dictionary maps to a corresponding value. Keys are unique and act as the index.

  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.

Python Dictionaries

1 Like

Answer

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

Explanation
A dictionary is a collection of key-value pairs, where each key is unique and maps to a corresponding value. The keys act as the index, allowing to access and manipulate the values associated with them.

Answered By

3 Likes


Related Questions