input: Write a function to print the numbers from 1 to 50, but for multiples of 3 print "Fizz" instead of the number, for multiples of 5 print "Buzz" instead of the number and for multiples of both 3 and 5 print "FizzBuzz".
  assert fizzbuzz()=="1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\nFizzBuzz\n16\n17\nFizz\n19\nBuzz\nFizz\n22\n23\nFizz\nBuzz\n26\nFizz\n28\n29\nFizzBuzz\n31\n32\nFizz\n34\nBuzz\nFizz\n37\n38\nFizz\nBuzz\n41\nFizz\n43\n44\nFizzBuzz\n46\n47\nFizz\n49\nBuzz\n"
  assert fizzbuzz()=="identical output as first test case"
output: def fizzbuzz():
      result = []
      for i in range(1, 51):
          if i % 3 == 0 and i % 5 == 0:
              result.append("FizzBuzz")
          elif i % 3 == 0:
              result.append("Fizz")
          elif i % 5 == 0:
              result.append("Buzz")
          else:
              result.append(str(i))
      return "\n".join(result) + "\n"