Define a function named , This function takes a list of integers and a target value as arguments . This function should return a sorted by a unique 2 An ordered list of element tuples , Each value in the tuple comes from the parameter list , And the sum of two tuple elements is equal to the total number of parameter targets .get_pair_sum (numbers_list target_total)
Be careful :
The parameter list may contain duplicate values .
. Each pair of values added to the sum in the formal parameter list should only appear once in the tuple list . for example , If the parameter list is [3,2,1,1,3], The total number of targets is 4, Then the output tuple list will contain only unique tuples (1,3), Without tuples (3,1).
. The tuple list must be arranged in ascending order .
Each tuple must be in ascending order ( for example (1,3) instead of (3,1)).