
FuzzBuzz and the Art of Programming - kiyanwang
http://dangerontheranger.blogspot.com/2016/05/fuzzbuzz-and-art-of-programming.html
======
hawkice
Obviously a minor point, but if x: return True else: return False is weirdo-
code. Just use return x, maybe cast to bool if you need to.

~~~
cool_guy_this
return x is way more pythonic, because it's much clearer and any non-boolean
value can be used in boolean contexts as well.

~~~
coldtea
You can also "return not not x" which turns the value into its boolean
true/false equivalent ("!!x" in a C-like language).

Or "return bool(x)" to make this more explicit.

Those would be handy e.g. if the code that uses your result behaves
differently 0 and False.

------
spc476
His recursive function didn't remove Boolean checks, it just hid it in the
runtime system. Better---have a function just print one out of the sequence. A
second function to call the first one ten times. Then a third function to call
the second one ten times. No loops, no (hidden) Boolean checks, no math, no
modulus, no recursion.

------
wnoise
No itertools.cycle()?

