Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by wilkystyle

19 hours ago

Python:

[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]

edit: Hacker News stripped the * character. Now it's properly escaped.

1 comment

wilkystyle

Reply

gilleain  18 hours ago

>>> len("[(x%3<1)'Fizz'+(x%5<1)'Buzz'or x for x in range(1,101)]")

57

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities