Python Basic Flashcards
1
Q
print()
A
Print smth out
2
Q
.format()
A
placeholder {}
3
Q
.append()
A
method to add a single item to the end of a list
4
Q
.extend()
A
method to add every item from one list to another list.
5
Q
.remove()
A
method to remove a particular value from a list.
6
Q
.split()
A
split str to list by ()
7
Q
”“.join()
A
join list concatenation separated by “”
8
Q
.index()
A
return index of ()
9
Q
del list[0]
A
remove smth at [0]
10
Q
.remove()
A
deletes the first instance of the value you provide it
11
Q
in
A
checking container
12
Q
.upper and .lower
A
Makes Uppercase and Lowercase
13
Q
input()
A
ask inside () and return string
14
Q
def function_name(argument):
A
definig function
15
Q
try:
except:
else:
A
try block for catching errors