Surprising output of Python program
<p>I am just started learning Python am getting bit confused after seeing the output of following program:</p>

<pre><code>#!/usr/bin/python
# Function definition is here
def changeme( mylist ):
    "This changes a passed list into this function"
    mylist = [1,2,3,4]; # This would assig new reference in mylist
    print "Values inside the function: ", mylist
    return

# Now you can call changeme function
mylist = [10,20,30];
changeme( mylist );

print "Values outside the function: ", mylist
</code></pre>

<p>Values inside the function:  <code>[1, 2, 3, 4]</code><br/>
Values outside the function:  <code>[10, 20, 30]</code></p>

<p>Why is Values outside the function: <code>[10, 20, 30]</code>, and not  <code>[1, 2, 3, 4]</code> since we are passing the argument to the function by reference?</p>
