Skip to content

Instantly share code, notes, and snippets.

@seanjensengrey
Created April 9, 2014 19:42
Show Gist options
  • Select an option

  • Save seanjensengrey/d053e7fa709e0699e291 to your computer and use it in GitHub Desktop.

Select an option

Save seanjensengrey/d053e7fa709e0699e291 to your computer and use it in GitHub Desktop.
t = {}
t[0,0] = lambda x: x
t[1,0] = lambda x: "Fizz"
t[0,1] = lambda x: "Buzz"
t[1,1] = lambda x: "FizzBuzz"
def tests(x):
return (x % 3 == 0, x % 5 == 0)
for x in range(1,101):
print t[tests(x)](x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment