News for hackers. Stuff that matters.
Re:Python overtakes JavaScript as most questioned language o... by Scarblac on Saturday April 20, 2019 @11:49AM (#19707157)
Yes, Python has both a set type and the immutable "frozenset" type, that can be used as a dictionary key.

someset = {"one", "two", "three"}

"one" in someset # true

frozen = frozenset(someset)

somedict = {frozen: "example"}

frozen in somedict # true somedict[frozen] # "example"

There are no comments on this comment yet.