-5

I am stuck trying to figure out an exercise question.

"Write a function that, given a list of pairs (,b) returns the first a that is greater than its corresponding b".

Can anyone please help me?

1 Answers1

0

I believe this function may help you: You can find out more about iterating pairs here.

def f(pairs):
    for x, y in pairs:
        if x > y:
            return x
Arman Babaei
  • 165
  • 1
  • 9