Python Basic Flashcards
print()
Print smth out
.format()
placeholder {}
.append()
method to add a single item to the end of a list
.extend()
method to add every item from one list to another list.
.remove()
method to remove a particular value from a list.
.split()
split str to list by ()
”“.join()
join list concatenation separated by “”
.index()
return index of ()
del list[0]
remove smth at [0]
.remove()
deletes the first instance of the value you provide it
in
checking container
.upper and .lower
Makes Uppercase and Lowercase
input()
ask inside () and return string
def function_name(argument):
definig function
try:
except:
else:
try block for catching errors
len()
Current length of the list
import os
os. name == nt ?
os. system(‘cls’) or os.system(‘clear’)
Windows?
Clear command
sys.exit
exit command line
abs()
absolute number
pass
Silent action
pop()
del and store from list