Written by Sean Behan on Sat Mar 04th 2017

Here is a quick and dirty way to destructure dictionaries in [Python]

d = {'a':'Apple', 'b':'Banana','c':'Carrot'}
a,b,c = [d[k] for k in ('a', 'b','c')]

a == 'Apple'
b == 'Banana'
c == 'Carrot'

Tagged with..
#Python #Data Structures

Just finishing up brewing up some fresh ground comments...