by gregjor · 2y ago · 0 comments
I don't doubt that such tools can help those with less experience and skill at figuring things out.
def fizzbuzz_even_surprise(n): return [ (lambda x: 'Surprise' if x % 2 == 0 and x % 3 == 0 and x % 5 == 0 else 'Fizz'(x % 3 == 0) + 'Buzz'(x % 5 == 0) or x)(x) for x in range(1, n+1) ]
print(fizzbuzz_even_surprise(30))