Python
From ZENotes
(Difference between revisions)
| Line 41: | Line 41: | ||
|yield | |yield | ||
|} | |} | ||
| + | |||
| + | |||
| + | The following are all legal Python expressions whose meaning is more or less clear: | ||
| + | |||
| + | 20 + 32 | ||
| + | hour - 1 | ||
| + | hour * 60 + minute | ||
| + | minute / 60 | ||
| + | 5 ** 2 | ||
| + | (5 + 9) * (15 - 7) | ||
| + | |||
| + | |||
| + | |||
| + | |||
Back to [[Self training]] | Back to [[Self training]] | ||
Revision as of 13:20, 1 May 2013
From http://interactivepython.org/courselib/static/thinkcspy/GeneralIntro/introduction.html
Python keywords
| and | as | assert | |
| break | |||
| class | continue | ||
| def | del | ||
| elif | else | except | exec |
| False | finally | for | from |
| global | |||
| if | import | in | is |
| lambda | |||
| nonlocal | None | not | |
| or | |||
| pass | |||
| raise | return | ||
| try | True | ||
| while | with | ||
| yield |
The following are all legal Python expressions whose meaning is more or less clear:
20 + 32 hour - 1 hour * 60 + minute minute / 60 5 ** 2 (5 + 9) * (15 - 7)
Back to Self training