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?
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?
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