A ____ in Python is a collection of key-value pairs, where the keys must be immutable.
- Dictionary
- List
- Set
- Tuple
In Python, a dictionary is a collection of key-value pairs, where the keys must be immutable (and usually unique). Tuples are immutable, making them suitable for use as dictionary keys.
Loading...
Related Quiz
- In Matplotlib, the ____ function is used to add text annotations in arbitrary locations of the plot.
- How would you run a Python script from the command line and pass arguments to it?
- In Django, how can you store static files, like CSS or JavaScript, so that they can be served efficiently?
- Python's ____ allows classes to be created dynamically, at runtime.
- How would you optimize the performance of a RESTful API that serves large datasets?