E
Emily Anne Moravec
I want to add 5 to each element of a list by using a for loop.
Why doesn't this work?
numbers = [1, 2, 3, 4, 5]
for n in numbers:
n = n + 5
print numbers
Why doesn't this work?
numbers = [1, 2, 3, 4, 5]
for n in numbers:
n = n + 5
print numbers