dict-unpacking-at-home
pip install dict-unpacking-at-home
# -*- coding: dict-unpacking-at-home -*-
to the top of your file
(second line if you have a shebang)# -*- coding: dict-unpacking-at-home -*- dct = {'greeting': 'hello', 'thing': 'world'} {greeting, thing} = dct print(greeting, greeting, thing) # hello hello world # even with nesting! dct = {'a': [1, 2, 3]} {'a': [1, *rest]} = dct print(rest) # [2, 3]