Easy and understandable Python Solution


#1

def fizzBuzz(self, n):
l=[]
i=1
while i <=n:
if i%3==0 and i%5==0:
l.append(‘FizzBuzz’)
elif i%3==0:
l.append(‘Fizz’)
elif i%5==0:
l.append(‘Buzz’)
else:
l.append(i)
i+=1
return l