Skip to content

Instantly share code, notes, and snippets.

Avatar

mongoose11235813

View GitHub Profile
@mongoose11235813
mongoose11235813 / beautiful_idiomatic_python.md
Last active August 2, 2017 18:00 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!
View beautiful_idiomatic_python.md

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
View mock.txt
w - while
i - if
( - begin
) - end
u, d, l, r - up, down, laft, right
0, 1 - clear, set
<, > - pop, push