I was using sum function in python, and i am clear about it's general structure sum(iterable, start) , but i am unable to get the logic behind the following code
test = sum(5 for i in range(5) )
print("output: ", test)
output: 25
Please can anyone describe what is happening here, basically here 5 is getting multiplied with 5, and same pattern is there for every sample input.