Python Keywords Flashcards
print to console
while
Controlling the flow of the program
for
Iterate over items of a collection in order that they appear
break
Interrupt the (loop) cycle, if needed
continue
Used to interrupt the current cycle, without jumping out of the whole cycle. New cycle will begin.
if
Used to determine, which statements are going to be executed (conditional)
elif
Stands for else if, if the first test evaluates to False, then it continues with the next one.
else
Is optional. The statement after the else keyword is excuted, unless the condition is True
is
Tets for object identity
not
Negates a boolean value
and
All conditions in a boolean expression must be met
or
At least one condition must be met
import
Import other modules into Python script
as
If we want to give a module a different alias
from
For importing a specific variable, class or a function from a module