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/xkcd_transcriber Jan 25 '17
Image
Mobile
Title: Ineffective Sorts
Title-text: StackSort connects to StackOverflow, searches for 'sort a list', and downloads and runs code snippets until the list is sorted.
Comic Explanation
Stats: This comic has been referenced 56 times, representing 0.0385% of referenced xkcds.
xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete