home ¦ Archives ¦ Atom ¦ RSS

Philips: Python Dictionary Recipe

In a recent addition to the Python cookbook, Richard Philips presents an elegant way to create dictionaries from lists (plists for you Lisp old timers), using Python's built-in dict, zip, and list slices.

© Brian M. Dennis. Built using Pelican. Theme by Giulio Fidente on github.