Reverse / invert a dictionary mapping April 18, 2022 by IT Nursery Given a dictionary like so: my_map = {'a': 1, 'b': 2} How can one invert this map to get: inv_map = {1: 'a', 2: 'b'} 32 s 32