Last active
March 13, 2017 10:27
-
-
Save jklydev/cdf4300ef42d7d337b811eae47e3eebe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flatten(lst): | |
flt_lst = [] | |
for item in lst: | |
if not type(item) == list: | |
flt_lst.append(item) | |
else: | |
flt_lst.extend(flatten(item)) | |
return flt_lst | |
def fizzbuzz(n=101): | |
for i in range(1, n): | |
output = "" | |
if i % 3 == 0: | |
output += "Fizz" | |
if i % 5 == 0: | |
output += "Buzz" | |
print(output or i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment