r/Python • u/zabolekar • Jan 23 '17
Share your unusual fizzbuzz approaches!
Dear /r/Python, I would like you to share your FizzBuzz. Here is mine:
import numpy as np
fb = np.arange(101, dtype='object')
fb[::3] = 'Fizz'
fb[::5] = 'Buzz'
fb[::15] = 'FizzBuzz'
print(*fb[1:], sep='\n')
4
Upvotes
View all comments
Show parent comment
1
u/lengau Jan 25 '17
Ok, here's one that isn't especially designed to be terrible. It's an arbitrary FizzBuzz generator where you can choose your Fizz and Buzz values and strings: