I am trying to turn a list of positive numbers into a list of negative numbers with the same value in python 3.3.3
For example turning [1,2,3] into
[1,2,3]
If you want to modify a list in place:
mylist = [ 1, 2, 3, -7] print(mylist) for i in range(len(mylist)): mylist[i] = -mylist[i] print(mylist)