SHARE
TWEET

Untitled

a guest Sep 13th, 2017 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def fizzbuzz(n):
  2.     for x in range(1,n+1):
  3.         result=''
  4.         if not x%3: result += ('fizz')
  5.         if not x%5: result += ('buzz')
  6.         yield result if result else str(x)
RAW Paste Data
Top