Computer Science (CS) III Mastery Practice Exam 2025 – Your All-in-One Guide to Exam Success!

Question: 1 / 400

Which of the following is a characteristic of Python dictionaries?

Ordered collections

Immutable keys

Key-value pairs

Python dictionaries are a built-in data structure that store data in the form of key-value pairs. This means that each entry in a dictionary is associated with a unique key, which is used to access its corresponding value. The primary characteristic that defines dictionaries is this key-value pairing, as it allows for efficient data retrieval based on the key.

The other characteristics mentioned illustrate different aspects of data structures or particular constraints unrelated to the core functionality of dictionaries. For instance, while some collections in Python may be ordered (like the lists or recently introduced OrderedDict), dictionaries themselves in Python 3.7 and above maintain insertion order as an implementation detail, though this is not a defining characteristic. Additionally, keys in a dictionary can be mutable types like integers and strings; however, the notion of keys being immutable may reflect a misunderstanding, as mutable objects cannot be used as dictionary keys. Lastly, dictionaries in Python are dynamic in size; they can grow or shrink as needed, accommodating various numbers of key-value pairs without a predefined size limit. Hence, the defining feature of Python dictionaries is indeed the organization of data into key-value pairs.

Get further explanation with Examzify DeepDiveBeta

Fixed size

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy