Skip to content

Instantly share code, notes, and snippets.

@shimbaco
Created February 1, 2010 07:36
Show Gist options
  • Save shimbaco/291518 to your computer and use it in GitHub Desktop.
Save shimbaco/291518 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
def fizzbuzz(i):
if (i % 15 == 0):
return "FizzBuzz"
elif (i % 3 == 0):
return "Fizz"
elif (i % 5 == 0):
return "Buzz"
else:
return i
num = 100;
lis = []
for i in range(num):
lis.append(fizzbuzz(i + 1))
print lis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment