Python Basic Flashcards

1
Q

print()

A

Print smth out

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

.format()

A

placeholder {}

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

.append()

A

method to add a single item to the end of a list

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

.extend()

A

method to add every item from one list to another list.

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

.remove()

A

method to remove a particular value from a list.

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

.split()

A

split str to list by ()

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

”“.join()

A

join list concatenation separated by “”

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

.index()

A

return index of ()

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

del list[0]

A

remove smth at [0]

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

.remove()

A

deletes the first instance of the value you provide it

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

in

A

checking container

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

.upper and .lower

A

Makes Uppercase and Lowercase

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

input()

A

ask inside () and return string

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

def function_name(argument):

A

definig function

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

try:
except:
else:

A

try block for catching errors

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

len()

A

Current length of the list

17
Q

import os

os. name == nt ?
os. system(‘cls’) or os.system(‘clear’)

A

Windows?

Clear command

18
Q

sys.exit

A

exit command line

19
Q

abs()

A

absolute number

20
Q

pass

A

Silent action

21
Q

pop()

A

del and store from list