Question: create a function pair_from_range(a,b): where the function should return a list of all possible tuples (i,j) within a range given certain conditions Example: if a=2

create a function pair_from_range(a,b): where the function should return a list of all possible tuples (i,j) within a range given certain conditions

Example:

if a=2 and b =5

the function should return

[(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)]

and the following rules should be considered

a <=i , j <=b , i

The order of the tuples inside the list doesn't matter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!