[ad_1]
There is no need to multiply each element by 2; just multiply the whole sum by 2 afterwards.
>>> data = [9, 4, 5]
>>> 2 * sum(data)
36
2
[ad_2]
solved Python performing calculation in a list
[ad_1]
There is no need to multiply each element by 2; just multiply the whole sum by 2 afterwards.
>>> data = [9, 4, 5]
>>> 2 * sum(data)
36
2
[ad_2]
solved Python performing calculation in a list