Can we use keys that are not strings?



In the context of this exercise, can we use keys that are not strings?


Yes, you can use different data types as keys instead of strings. However, the different types of keys you can use will depend on what programming language you are using.

In languages such as Java or Python, you can use almost any type of object as your keys. These include objects like lists, instances, dictionaries, and other objects in that language. You can also use numerical values such as integers or float values, or single characters as your keys.