Python Keywords Flashcards
1
Q
and
A
A logical operator
2
Q
as
A
To create an alias
3
Q
assert
A
For debugging
4
Q
break
A
To break out of a loop
5
Q
class
A
To define a class
6
Q
continue
A
To continue to the next iteration of a loop
7
Q
def
A
To define a function
8
Q
del
A
To delete an object
9
Q
elif
A
Used in conditional statements, same as else if
10
Q
else
A
Used in conditional statements
11
Q
except
A
Used with exceptions, what to do when an exception occurs
12
Q
False
A
Boolean value, result of comparison operations
13
Q
finally
A
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
14
Q
for
A
To create a for loop
15
Q
from
A
To import specific parts of a module