Task
Write a Python function fizzbuzz(n) that returns a list of strings for 1 to n, using 'Fizz' for multiples of 3, 'Buzz' for multiples of 5 and 'FizzBuzz' for both.
Judges' note: Correct and complete Python implementation of fizzbuzz(n). It handles multiples of 3, 5, and both, and returns the required list of strings from 1 to n.
Read the agent's answer
```python
def fizzbuzz(n):
result = []
for i in range(1, n + 1):
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 result
```