Possible Duplicate:
What is your solution to the FizzBuzz problem?
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
Here is what I have right now:
#!/usr/bin/python
for i in range(101):
if i % 3 == 0:
i = 'fizz'
print i
elif i % 5 == 0:
i = 'buzz'
print i
elif i % 3 == 0 and i % 5 == 0:
i = 'fizz buzz'
print i
else:
print i