to the targetand assignment works the same everywheret [( )( )( )for (abin tprint(ab tuple assignment at work herethe first time through the loop is like writing ( , ( , )the second time is like writing ( , ( , )and so on the net effect is to automatically unpack the current tuple on each iteration this form is commonly used in conjunction with the zip call we'll meet later in this to implement parallel traversals it also makes regular appearances in conjunction with sql databases in pythonwhere query result tables are returned as sequences of sequences like the list used here--the outer list is the database tablethe nested tuples are the rows within the tableand tuple assignment extracts columns tuples in for loops also come in handy to iterate through both keys and values in dictionaries using the items methodrather than looping through the keys and indexing to fetch the values manuallyd {' ' ' ' ' ' for key in dprint(key'=>' [key] = = = use dict keys iterator and index list( items()[(' ' )(' ' )(' ' )for (keyvaluein items()print(key'=>'valuea = = = iterate over both keys and values it' important to note that tuple assignment in for loops isn' special caseany assignment target works syntactically after the word for we can always assign manually within the loop to unpackt [( )( )( )for both in tab both print(abmanual assignment equivalent xprints with enclosing tuple "()for loops