Ask Your Question

Revision history [back]

This is a pure Python solution which also works in Sage:

sage: [(x,y) for x in range(1, 10) for y in range(1, 10) if x+y==15]
[(6, 9), (7, 8), (8, 7), (9, 6)]