Hi, I just started picking up python yesterday, and have already come across something that has me stumped. I want some code that does this:
a = foo(a) b = foo(b) c = foo(c) So I try to do this with a for loop, like so: for i in [a, b, c]: i = foo(i) print i # make sure that it worked correctly So far, so good. The problem is that outside the loop, the values aren't changed. For example, print [a, b, c] # outside the loop; the values never actually changed! What is going on? Why aren't the values of my variables changing when I change them inside a loop like this? -- Evan _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
