simultaneous assignments the combination of automatic packing and unpacking forms technique known as simultaneous assignmentwhereby we explicitly assign series of values to series of identifiersusing syntaxxyz in effectthe right-hand side of this assignment is automatically packed into tupleand then automatically unpacked with its elements assigned to the three identifiers on the left-hand side when using simultaneous assignmentall of the expressions are evaluated on the right-hand side before any of the assignments are made to the left-hand variables this is significantas it provides convenient means for swapping the values associated with two variablesjk kj with this commandj will be assigned to the old value of kand will be assigned to the old value of without simultaneous assignmenta swap typically requires more delicate use of temporary variablesuch as temp = temp with the simultaneous assignmentthe unnamed tuple representing the packed values on the right-hand side implicitly serves as the temporary variable when performing such swap the use of simultaneous assignments can greatly simplify the presentation of code as an examplewe reconsider the generator on page that produces the fibonacci series the original code requires separate initialization of variables and to begin the series within each pass of the loopthe goal was to reassign and brespectivelyto the values of and + at the timewe accomplished this with brief use of third variable with simultaneous assignmentsthat generator can be implemented more directly as followsdef fibonacci)ab while trueyield ab ba+