Dec 17, 2019 · Recursive code to find the sum of all elements of a list in python. findSum(list1) is recursively called until the last element of the list.. Open in app. Home. Notifications. Lists. Stories.. The simplification of code is a result of generator function and generator expression support provided by Python. To illustrate this, ... When we use range we build a 1,000,000 element list in memory and then find its sum. This is a waste, considering that we use these 1,000,000 elements just to compute the sum. This waste becomes more pronounced as the number of elements.