Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import re
- p = re.compile("(<class '__main__.)|('>)")
- cnv = lambda x: re.sub(p, '', str(x))
- for i in range(1, 20):
- if i % 15 == 0:
- print(cnv(type('fizzbuzz', (), {})))
- elif i % 5 == 0:
- print(cnv(type('buzz', (), {})))
- elif i % 3 == 0:
- print(cnv(type('fizz', (), {})))
- else:
- print(cnv(type(str(i), (), {})))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement