Return to Blog entry
# For fixed values of Fizz/Buzz for n in range(1,101): fizz = n % 3 buzz = n % 5 result = "" if not fizz: result += "Fizz" if not buzz: result += "Buzz" else: if fizz: result += str(n) print result