input: Write a function to replace elements in the array according to the following rules: if the element is divisible by 3, replace it with "Fizz"; if the element is divisible by 5, replace it with "Buzz"; if the element is divisible by both 3 and 5, replace it with "FizzBuzz". If the array is empty, return an empty array.
  assert fizz_buzz([2, 3, 4, 5, 6, 15])==[2, 'Fizz', 4, 'Buzz', 'Fizz', 'FizzBuzz']
  assert fizz_buzz([10, 12, 8])==['Buzz', 'Fizz', 8]
  assert fizz_buzz([15, 30, 45])==['FizzBuzz', 'FizzBuzz', 'FizzBuzz']
  assert fizz_buzz([])==[]
output: def fizz_buzz(arr):
      result = []
      for num in arr:
          if num % 3 == 0 and num % 5 == 0:
              result.append("FizzBuzz")
          elif num % 3 == 0:
              result.append("Fizz")
          elif num % 5 == 0:
              result.append("Buzz")
          else:
              result.append(num)
      return result