solution to the exercises at the end of part ii because python creates temporary tuple that saves the original values of the variables on the right while the statement runsunpacking assignments are also way to swap two variablesvalues without creating temporary variable of your own--the tuple on the right remembers the prior values of the variables automaticallynudge wink nudgewink winknudge nudgewink ( tuplesswaps values like nudgenudge winkwink in factthe original tuple and list assignment forms in python have been generalized to accept any type of sequence (reallyiterableon the right as long as it is of the same length as the sequence on the left you can assign tuple of values to list of variablesa string of characters to tuple of variablesand so on in all casespython assigns items in the sequence on the right to variables in the sequence on the left by positionfrom left to right[abc( ac ( (abc"abcac (' '' 'assign tuple of values to list of names assign string of characters to tuple technically speakingsequence assignment actually supports any iterable object on the rightnot just any sequence this is more general category that includes collections both physical ( listsand virtual ( file' lines)which was defined briefly in and has popped up in passing ever since we'll firm up this term when we explore iterables in and advanced sequence assignment patterns although we can mix and match sequence types around the symbolwe must generally have the same number of items on the right as we have variables on the leftor we'll get an error python allows us to be more general with extended unpacking syntaxdescribed in the next section but normally in --and always in --the number of items in the assignment target and subject must matchstring 'spamabcd string ad (' '' 'same number on both sides abc string error if not error text omitted valueerrortoo many values to unpack (expected assignmentsexpressionsand prints