CodyKochmann
9/22/2016 - 6:54 PM

From http://www.python-course.eu/lambda.php using a lambda function to total the sum of the range from 1-100 in one line in python

From http://www.python-course.eu/lambda.php using a lambda function to total the sum of the range from 1-100 in one line in python

# Calculating the sum of the numbers from 1 to 100
reduce(lambda x, y: x+y, range(1,101)) 
# 5050