Python make method immutable
<p>I have the following code:</p>

<pre><code>class Hello(object):
    def __init__(self, names):
        self.names = names
    def getnames(self):
        return self.names  

if __name__ == "__main__":
    names = ['first', 'middle', 'last']     
    ob = Hello(names)
    a = ob.getnames()
    print a
    a.remove('first')
    print a
    print ob.getnames()
</code></pre>

<p>The following is the output:</p>

<pre><code>['first', 'middle', 'last']
['middle', 'last']
['middle', 'last']
</code></pre>

<p>Is it because the method getnames is mutable? Or may be there is something else going on here. Can anyone explain?
How do I make the method return the original list?</p>
