3 ms·
Oh, you want metaclasses? How about this? print(type("",(),{"__call__": lambda self, start, end: [(n, (lambda x: (
by pcote 14y ago
Oh, you want metaclasses? How about this?
print(type("",(),{"__call__":
lambda self, start, end:
[(n, (lambda x: ("fizz" if x % 3 == 0 else "") + ("buzz" if x % 5 == 0 else ""))(n))
for n in range(start,end+1)]
})()(1,50))