table continued item description len(smin(smax(snumber of elements in minimum value in maximum value in sum of items in checks whether all items in are true checks whether any item in is true sum( [,initial]all(sany(stable operations applicable to mutable sequences item description [iv [ :jt [ : :stridet del [idel [ :jdel [ : :strideitem assignment slice assignment extended slice assignment item deletion slice deletion extended slice deletion lists lists support the methods shown in table the built-in function list(sconverts any iterable type to list if is already listthis function constructs new list that' shallow copy of the append(xmethod appends new elementxto the end of the list the index(xmethod searches the list for the first occurrence of if no such element is founda valueerror exception is raised similarlythe remove(xmethod removes the first occurrence of from the list or raises valueerror if no such item exists the extend(tmethod extends the list by appending the elements in sequence the sort(method sorts the elements of list and optionally accepts key function and reverse flagboth of which must be specified as keyword arguments the key function is function that is applied to each element prior to comparison during sorting if giventhis function should take single item as input and return the value that will be used to perform the comparison while sorting specifying key function is useful if you want to perform special kinds of sorting operations such as sorting list of stringsbut with case insensitivity the reverse(method reverses the order of the items in the list both the sort(and reverse(methods operate on the list elements in place and return none table list methods method description list(ss append(xs extend(ts count(xconverts to list appends new elementxto the end of appends new listtto the end of counts occurrences of in lib fl ff