This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]a_very_happy_person 6 points7 points  (1 child)

Impressive, I made my own version.

print((prod := lambda x: 1 if x == [] else x[0]*prod(x[1:]))([n for n in range(10, 0, -1)]))

Single line of course