| 1 | initial version |
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)]
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.