Keywords in python Flashcards

1
Q

and

A

a logical operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

as

A

used to create an alias/alternative name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

assert

A

used for debugging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

break

A

break out a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

class

A

used to define a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

continue

A

skip the next iteration of a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

def

A

it is used to define a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

del

A

used to delete an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

elif / else

A

conditional statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

except

A

try-except is used to handle these errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

false

A

expression that will result in not being true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

finally

A

used with exceptions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

for

A

create loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

from

A

import specific parts of a module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

global

A

declare a global variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

if

A

to create conditional statements

17
Q

Import

A

import a module

18
Q

is

A

used to test if two variables are equal

19
Q

in

A

to check if a value present in a tuple, list etc

20
Q

lambda

A

used to create an anonymous function

21
Q

none

A

represents a null value

22
Q

nonlocal

A

a non-local variable

23
Q

not

A

a logical operator

24
Q

or

A

logical operator

25
Q

pass

A

used when user does not want any code to execute

26
Q

raise

A

used to raise exceptions or errors

27
Q

return

A

used to end the execution

28
Q

true

A

represents an expression that will result in true

29
Q

try

A

used to handle errors

30
Q

while

A

used in exception handling

31
Q

yield

A

create a generator function