DEV Community

loading...

Discussion on: Fizz Buzz in Every Language

Collapse
creativecaver profile image
Creative Cave
    print('\n'.join(['FizzBuzz' if x % 15 == 0 else 'Fizz' if x % 3 == 0 else 'Buzz' if x % 5 == 0 else str(x) for x in range(1,101)]))

Collapse
renegadecoder94 profile image
Jeremy Grifski Author

Is this a Python solution using a massive list comprehension?! I like it.