collection data types [ ][ = [ ][- = [- ][ = [- ][- ='echol[ ][ ][ = [ ][ ][- = [- ][- ][ = [- ][- ][- ='clists can be nestediterated overand slicedthe same as tuples in factall the tuple examples presented in the preceding subsection would work exactly the same if we used lists instead of tuples lists support membership testing with in and not inconcatenation with +extending with +( the appending of all the items in the right-hand operand)and replication with and *lists can also be used with the built-in len(functionand with the del statement discussed here and described in the sidebar "deleting items using the del statement in additionlists provide the methods shown in table although we can use the slice operator to access items in listin some situations we want to take two or more pieces of list in one go this can be done by sequence unpacking any iterable (liststuplesetc can be unpacked using the sequence unpacking operatoran asterisk or star (*when used with two or more variables on the left-hand side of an assignmentone of which is preceded by *items are assigned to the variableswith all those left over assigned to the starred variable here are some examplesfirst*rest [ - firstrest ( [ - ]first*midlast "charles philip arthur george windsorsplit(firstmidlast ('charles'['philip''arthur''george']'windsor'*directoriesexecutable "/usr/local/bin/gvimsplit("/"directoriesexecutable (['''usr''local''bin']'gvim'when the sequence unpacking operator is used like thisthe expression *restand similar expressionsare called starred expressions python also has related concept called starred arguments for exampleif we have the following function that requires three argumentsdef product(abc)return hereis the multiplication operator we can call it with three argumentsor by using starred argumentsproduct( [ product(* product( * [ :]