[Solved] How to get tuple of numbers that fulfill a condition? [closed]


So basically instead of adding the values on the return just

[(x, y) for x in [2,3,4] for y in [2,4,5] if x+y==7]

I expect this will give you the desired output you asked for.

solved How to get tuple of numbers that fulfill a condition? [closed]