Search notes:

(some) Python statements

class

See class

def

def defines a user defined function object.

for

The for statement can be used, for example, to iterate over a numeric range or to iterate over the individual characters of a string.

global

See global and nonlocal

if

See if

import

See import

pass

Explicitly do nothing.
def Foo():
    pass

raise

raise raises an exception.
See also exception handling

while

while cond: iterates over a block of code until a certain condition (cond) becomes false.

with

See here.

yield

yield

See also

assert checks a condition if __debug__ is True. If the condition is False, it raises an AssertionError exception.
break
pass is Python's no-op statement.
return
del

Index