FUNCTIONS IN LISTS :
Name Function Format
len - tells length of a list
len(l1)
list - returns list created from seq type
list(seq)
index - returns lowest index of a substring
l1.index()
append - adds an item to the end of list
l1.append()
extend - adds multiple items at end of list
l1.extend([])
insert - adds item to specific position
l1.insert(index,item)
pop - removes an item by index
l1.pop(index)
remove - remove a specific item
l1.remove()
clear - removes all items at once
l1.clear()
count - tells occurences of a particular item
l1.count()
reverse - reverses the whole list
l1.reverse()
sort - sorts items of list in ascending order
l1.sort()
sorted - sorts items in ascending/descending order
sorted(l1)/sorted(l1,reverse=True)
min - displays min element of list
min(l1)
max - displays max element of list
max(l1)
sum - displays sum of elements in a list
sum(l1)
del - remove multiple items from list using index del
l1[lower index:higher index]