Keywords Flashcards
del
Delete from dictionary.
…del X[Y]
and
Logical and.
…True and False == False
from
Importing specific parts of a module
…from x import Y
not
Logical not
…not True == False
while
while loop, keeps running so long as the test at the top is True
…while X: pass
as
Part of the with-as statement.
…with X as Y: pass
elif
Else if condition.
…if: X; Elif: Y; else: J
global
Declare that you want a global variable
…global X
or
Logical or
..True or False == True
with
With an expression as a variable do.
…with X as Y: pass
assert
Assert (ensure) that something is true.
…assert False, “Error!”
else
Else condition
…if: X; elif: Y; else: J
if
If condition.
…if: X; elif: Y; else: J
pass
This block is empty.
…def empty(): pass
yield
Pause here and return to caller.
…def X(): yield Y; X().next()