Winand

Untitled

Nov 1st, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def f2(_x,_y):
  2.     if type(_x) is list: ret=_x
  3.     else: ret=[_x[1]] if _x[0]==(x,y) else []
  4.     if _y[0]==(x,y): ret.append(_y[1])
  5.     return ret
  6. print reduce(f2, objects)
Advertisement
Add Comment
Please, Sign In to add comment