[ naturallylike normal sequence assignmentextended sequence unpacking syntax works for any sequence types (reallyagainany iterable)not just lists here it is unpacking characters in string and range (an iterable in ) * 'spamab (' '[' '' '' '] *bc 'spamabc (' '[' '' ']' ' *bc range( abc ( [ ] this is similar in spirit to slicingbut not exactly the same-- sequence unpacking assignment always returns list for multiple matched itemswhereas slicing returns sequence of the same type as the object sliceds 'spams[ ] [ :(' ''pam'slices are type-specificassignment always returns list [ ] [ : ] [ (' ''pa'' 'given this extension in xas long as we're processing list the last example of the prior section becomes even simplersince we don' have to manually slice to get the first and rest of the itemsl [ while lfront* print(frontl [ [ [ [get firstrest without slicing boundary cases although extended sequence unpacking is flexiblesome boundary cases are worth noting firstthe starred name may match just single itembut is always assigned listseq [ assignmentsexpressionsand prints