I want to create a set from the values of an existing dict
def function(dictionary): ... return set_of_values
Say my dictionary lo
For Python:
set(d.values())
Equivalent on Python 2.7:
set(d.viewvalues())
If you need a cross-compatible Python 2.7/3.x code:
{d[k] for k in d}