python function that modifies parameters
<pre><code>def add(a,b):
    for i in range(len(a)):
        a[i] = a[i] + b

def main():
    amounts = [100,200]
    rate = 1
    add(amounts,rate)
    print amounts

main()
</code></pre>

<p>The function add does not have a return. I read that changes are available to only mutable objects like list. But why did the person omits the return? Either with or without return is fine. Why? This is so different from C++.</p>

<p>Thanks</p>
