print(abcd [ secondif there is nothing left to match the starred nameit is assigned an empty listregardless of where it appears in the followingabcand have matched every item in the sequencebut python assigns an empty list instead of treating this as an error caseabcd* seq print(abcde [ab*ecd seq print(abcde [finallyerrors can still be triggered if there is more than one starred nameif there are too few values and no star (as before)and if the starred name is not itself coded inside sequencea*bc* seq syntaxerrortwo starred expressions in assignment ab seq valueerrortoo many values to unpack (expected * seq syntaxerrorstarred assignment target must be in list or tuple *aseq [ useful convenience keep in mind that extended sequence unpacking assignment is just convenience we can usually achieve the same effects with explicit indexing and slicing (and in fact must in python )but extended unpacking is simpler to code the common "firstrestsplitting coding patternfor examplecan be coded either waybut slicing involves extra workseq [ * seq ab ( [ ]firstrest ab seq[ ]seq[ :ab ( [ ]firstresttraditional assignment statements