Is it possible to have something like:
list1 = ... currentValue = 0 list2 = [currentValue += i, i for i in list1]
I tried that but didn\'t wor
Why would you create a duplicate list. It seems like all that list comprehension would do is just sum the contents.
Why not just.
list2 = list(list1) #this makes a copy currentValue = sum(list2)