1👍
So you want to look up the dictionary’s key by its value like so:
In [1]: UserGenderType.labels.keys()[UserGenderType.labels.values().index('Male')]
Out[1]: 1
Source:stackexchange.com