Question: Problem 5 Prob5 has two inputs a list of distinct numbers ( L ) and another number (s). Prob5 must returns all pairs of numbers

Problem 5 Prob5 has two inputs a list of distinct numbers ( L ) and another number (s). Prob5 must returns all pairs of numbers in L, whose sums are less than s. For example, prob5 ([5,7,1,8,3],10) returns [(5,1),(5,3),(7,1),(1,8),(1,3)] Note: the pairs (5,1) and (1,5) are the same. So, you can only keep one of them. def prob5(L, s ): output = [] \#\# your code goes here return output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
