jemnotesversion 2 / featuring this entry or see all/search

Aug 5
Taking things to extremes when calculating the product of 1 through to 9.
# Python version.
prod = 1
for x in range(1, 10):
    prod *= x
prod
# Ruby version.
(1..9).inject :*