Useful Python Idioms, Recipes, and snippets.
Note: These apply mainly to python 3.x as they are built using that version.
This means that either:
- An entry will work on 2.7.x
- An entry will fail on 2.7.x
- An entry won't be efficient on 2.7.x (such as using range vs xrange)
- Something I haven't thought of
I try to use the standard library for the majority of my work so most of these will be based off of what is available to everyone who has installed python.
My version: 3.3.2