Keyword Index
Python Keywords
Reference ยท Keyword Index
๐ Every Python Keyword in One Place
A reference page for each Python keyword, written on request: what it does, its syntax, how it behaves in different situations, runnable examples and the traps for Java / JavaScript programmers. A keyword shown as (planned) has no page yet. Where a page covers several related keywords, each of them links to the same page. Each page gets a companion exercise set where there are worthwhile exercises to write.
3 of 39 keywords have a reference page (3 pages written, 3 with exercises).
Loops and flow
for(planned)page planned with: in
in(planned)page planned with: for
pass(planned)
Decisions and matching
if(planned)page planned with: elif, else
elif(planned)page planned with: if, else
else(planned)page planned with: if, elif
match(planned)page planned with: case, _
case(planned)page planned with: match, _
_(planned)page planned with: match, case
Values and logic
True(planned)page planned with: False, None
False(planned)page planned with: True, None
None(planned)page planned with: True, False
and(planned)page planned with: or, not
or(planned)page planned with: and, not
not(planned)page planned with: and, or
is(planned)
Functions and scope
def(planned)page planned with: return
return(planned)page planned with: def
lambda(planned)
yield(planned)
global(planned)page planned with: nonlocal
nonlocal(planned)page planned with: global
Classes
class(planned)
Errors
try(planned)page planned with: except, finally
except(planned)page planned with: try, finally
finally(planned)page planned with: try, except
raise(planned)
assert(planned)
Modules and resources
import(planned)page planned with: from, as
from(planned)page planned with: import, as
as(planned)page planned with: import, from
with(planned)
Other
del(planned)
async(planned)page planned with: await
await(planned)page planned with: async
type(planned)