Skip to content

Instantly share code, notes, and snippets.

@c0nn3r
Created May 2, 2017 05:06
Show Gist options
  • Save c0nn3r/7dd031824e3f94e0e9ff528f9f0b03ba to your computer and use it in GitHub Desktop.
Save c0nn3r/7dd031824e3f94e0e9ff528f9f0b03ba to your computer and use it in GitHub Desktop.
a = globals()
w = str(a.__ge__(12))[3].lower()
b = '__bu' + w + 'lt' + w + 'ns__'
p = 'pr' + w + 'nt'
e = w + 'nput'
ne = w + 'nt'
l = 'l' + w + 'st'
pf = getattr(a[b], p)
ee = getattr(a[b], e)
ne = getattr(a[b], ne)
ll = getattr(a[b], l)
n = ne(ee())
def fbm(x):
try:
assert x % 15 == 0
pf('F' + w + 'zzBuzz')
except:
try:
assert x % 3 == 0
pf('F' + w + 'zz')
except:
try:
assert x % 5 == 0
pf('Buzz')
except:
pf(x)
ll(map(fbm, range(1, n + 1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment