>>> def foo2(x): ... x = 5 ... return x ... >>> as = 10 >>> foo2(as) 5 >>> print as 10 >>> asd = [1,2] >>> foo2(asd) 5 >>> print asd [1, 2] So this means that arguments are passed by value, but lists (and other data structure) hold references to the data itself, so you are able to change values (and modify the argument variable) only if they are hold by data structures.