Robotics & Artificial Intelligence

What is a dictionary in Python?

  1. A collection of ordered and immutable elements
  2. A collection of unordered, changeable, and indexed key-value pairs
  3. A collection of unique elements
  4. A collection of ordered values with no keys

Getting Started

3 Likes

Answer

A collection of unordered, changeable, and indexed key-value pairs

Reason — A dictionary in Python is defined as a collection of unordered data values that are changeable and indexed. Each element in a dictionary is stored as a key–value pair, where the key is unique and used to access the corresponding value. Dictionaries are enclosed in curly braces {}.

Answered By

3 Likes


Related Questions