sets and maps compute the total sales per month for given store - array is returned that contains the totals for each month def totalsalespermonthsalesdatastore )the store number must be offset by store the totals will be returned in - array totals array iterate over the sales of each month for in rangesalesdata length( )sum iterate over the sales of each item sold during the month for in rangesalesdata length( )sum +salesdata[simstore the result in the corresponding month of the totals array totals[msum return the - array return totals figure illustrates the use of the - array for storing the individual monthly totals the shaded area shows the elements of the - array that are accessed when computing the total sales for the month of april at store number the monthly total will be stored at index position within the - array since that is the corresponding column in the - array for the month of april months store items totals figure the elements the - array that must be accessed to compute the monthly sales for store number