Module rpu.dicts
Functions
def flip_dict(dict_: dict[~T, ~D], /) ‑> dict[~D, ~T]
-
Flips a dictionarys keys and values
Parameters
dict_
:dict
- the dict you want to flip
Returns
dict
- the flipped dict
Example
>>> flip_dict({'foo' : 'bar'}) ... {'bar' : 'foo'}