[ create a new paste ] login | about

Link: http://codepad.org/eYXmgkEp    [ raw code | output | fork ]

aaronla - Python, pasted on Feb 19:
1
2
3
4
5
6
7
8
9
10
11
12
def loop(g):
  x = None
  for x in g: pass
  return x
def fprint(*xs): 
  for x in xs: print x,
  print

loop(fprint(a,b,c) if a*a+b*b==c*c else None
     for a in xrange(1,20)
     for b in xrange(a,20)
     for c in xrange(b,20))


Output:
1
2
3
4
5
3 4 5
5 12 13
6 8 10
8 15 17
9 12 15


Create a new paste based on this one


Comments: