Skip to content

Instantly share code, notes, and snippets.

@bobsilverberg
Created August 27, 2013 20:19
Show Gist options
  • Select an option

  • Save bobsilverberg/6358609 to your computer and use it in GitHub Desktop.

Select an option

Save bobsilverberg/6358609 to your computer and use it in GitHub Desktop.
def fun():
print("Yes")
return 1
or_test = lambda x, y: x or y
>>> or_test(1, 2)
1
>>> or_test(2, 3)
2
>>> or_test(fun(), 1)
Yes
1
>>> or_test(1, fun())
Yes
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment