Python get for loop result into an array variable : <pre><code>code = []
def getCode():
    for data in range(59):
        code = []
        min = 9900
        max = 9999

        code1 = randint(min, max)
        code2 = randint(min, max)

        code = str(code1) + '/' + str(code2)
        # print(code)

        return code

print(getCode()) 

dat2 = pd.DataFrame({'code': [getCode()]})
</code></pre>

<p>Hi, I'm trying to get a list of the number from the for loop. example result should be <code>[[9900/9910],[9910/9920],.....]</code>. However the code above only return me <code>9900/9910</code> even if I declare the array variable.</p>
