Which data type requires you to supply a key to extract a value?
- list
- dictionary
- string
- integers
Explanation: In Python, a dictionary is a data structure that allows you to create key-value pairs to match specific keys to their corresponding values. According to the sources, while a list requires you to supply an integer index to extract an element, a dictionary requires you to supply a key to extract its value. This key-value system is also the basis for how JSON objects represent data.
Related exam: Modules 21 – 22: Checkpoint Exam: Programmability Answers (CCNP ENCOR v9)
