Robotics & Artificial Intelligence

Assertion (A): A Python dictionary is a collection of unordered data that stores values as key-value pairs.

Reason (R): In a dictionary, the keys are unique and serve as an index for accessing associated values.

  1. Both (A) and (R) are true and (R) is a correct explanation of (A).
  2. Both (A) and (R) are true and (R) is not a correct explanation of (A).
  3. (A) is true and (R) is false.
  4. (A) is false and (R) is true.

Getting Started

2 Likes

Answer

Both (A) and (R) are true and (R) is a correct explanation of (A).

Reason — A Python dictionary is defined as a collection of unordered data values that stores information in the form of key–value pairs. Each key in a dictionary is unique and is used to access its corresponding value.

Answered By

2 Likes


Related Questions