Is assigning two variables to items in the same list the best way to access and perform operations on those items?
Python provides built in method
from itertools import product
l = [1,2,3]
Then generate the sum using list comprehension in a single step to be more efficent
result= [sum(i) for i in product(l, repeat= 2) ]
#result=[2, 3, 4, 3, 4, 5, 4, 5, 6]