Tuples can be used as keys in dictionaries because they are _______.
- Hashable
- List-like
- Ordered
- Unchangeable
Tuples can be used as keys in dictionaries because they are hashable, which means their contents do not change, making them suitable for dictionary keys.
Loading...
Related Quiz
- The operation used to get all the items that are unique to each set is called _______.
- Which keyword allows the creation of a block of code that always runs, regardless of exceptions?
- What is the primary distinguishing feature of elements in a Python set?
- You are developing a Python program and need to debug a function in a module. Which Python tool would you use to step through the code and inspect the values of variables?
- In Scikit-learn, the ____ class is used for feature scaling.