Local variables in Python
<p>I wrote this small program to print multiplication tables. I was understanding the local variables then I added two variables with same name in each function. but it is running and I am not getting any 2 variables with same name error. Please help me understand the idea here -</p>

<pre><code>def printMultiples(n):
    i = 1
    i = 5
    while i &lt;= 10:
        print n*i, '\t',
        i = i + 1
    print

def printMultTable():
    i = 1
    i = 10
    while i &lt;= 10:
        printMultiples(i)
        i = i + 1
</code></pre>
