Trouble creating my own "zip" function in Python
<p>as a personal exercise I am trying to create my own little zip() function that takes two lists and puts the items into a list of tuples. In other words if these are  my list:</p>

<pre><code>fr = [6,5,4]
tr = [7,8,9]
</code></pre>

<p>I would expect this:</p>

<pre><code>[(6,7), (5,8), (4,9)]
</code></pre>

<p>Here is my code:</p>

<pre><code>def zippy(x, y):
    zipper = []
    for i in x :
        for g in y:
            t = (i,g)
        zipper.append(t)
</code></pre>

<p>What I get is: <code>[(6, 9), (5, 9), (4, 9)]</code>,
but when I define the lists inside of the function, it works as intended. Any help is appreciated. </p>