Comment by tzs
2 days ago
There is usually more than one way to do it in Python, too. For example most people's Python fizzbuzz seem pretty different from mine:
def fizzbuzz(n, *args):
cur = ['' for x in range(1,n+1)]
for m, postfix in args:
cur = [y+postfix if x%m==0 else y for x, y in zip(range(1,n+1), cur)]
cur = [str(x) if y == '' else y for x, y in zip(range(1,n+1), cur)]
return cur
print("\n".join(fizzbuzz(100, (3, 'fizz'), (5, 'buzz'))))
:)
In Python, there should be one obvious way to do it. Your way is clearly a joke or an abomination.
You are funny. I love it.