Collections as dictionary keys
A dictionary stores route labels using keys that describe city names. Listing 1 defines four candidate keys: a tuple, a list, a set, and a tuple containing a list.
Which candidates can be used directly as a dictionary key, without converting them to another type? Consider each candidate separately.
pairandgrouponly.paironly.stopsandcitiesonly.- All four candidates.