Last active
August 29, 2015 14:05
-
-
Save mlconnor/ad6c8c46b09b86d7f80b to your computer and use it in GitHub Desktop.
Python notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Good basic intro on types | |
https://docs.python.org/2/tutorial/introduction.html | |
https://docs.python.org/2/tutorial/controlflow.html | |
blocks use : and indent | |
while a < b: | |
print a | |
if x < 0: | |
...x = 0 | |
...print 'Negative changed to zero' | |
elif x == 0: | |
...print 'foo' | |
... words = ['cat', 'window', 'defenestrate'] | |
>>> for w in words: | |
... print w, len(w) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment