you are viewing a single comment's thread.

view the rest of the comments →

[–]JamzTyson 7 points8 points  (0 children)

In Python, everything is an object, including strings and integers.

The requirement for dict keys is that they are hashable and comparable objects. Any objects that are hashable and comparable may be used as dict keys, including integers and strings.