Python programming patterns and snippets