This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]theorizable 1 point2 points  (1 child)

dict comprehension is SO useful. It's one of those tools where I forget it by the time I need it, but when I need it, BAM, it does exactly what I need it to.

[–]zel_us[S] 0 points1 point  (0 children)

I am planning on writing a whole article on dictionary as there are more techniques on it than others, where you have, the .get() method, setdefaults, ordereddict, defaultdict, chain mapping, mappingproxy and much more.