for i in range(1,20): str = ''.join(["Fizz"][i%3:] + ["Buzz"][i%5:]) print(str) if str else print(i)
Standard input is empty
1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!