Advertisement
HasteBin0

FizzBuzz WnW

Jun 22nd, 2020 (edited)
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def fizzbuzz(x: int) -> str:  # Weird n Wacky
  2.     return (str(x), "Fizz", "Buzz", "FizzBuzz")[int(x % 3 == 0) + int(x % 5 == 0) * 2]
  3.  
  4. for n in range(1, 100):
  5.     print(fizzbuzz(n))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement