How to sum all range output in python 3

You can use a generator expression within the sum function

>>> sum(i**i for i in range(1,11))
10405071317

Browse More Popular Posts

Leave a Comment