How does append() work in this code snippet? Confused with a particular variable : <p>Can someone explain this code to me? 
More specifically, the part about lead.append([sum1 - sum2 , 1]) and print(ans[1],ans[0]). </p>

<p>I do not understand the "1" in "lead.append([sum1 - sum2 , 1])"</p>

<p>I, also, do not understand the "1" and "0" in print(ans[1],ans[0]). </p>

<pre class="lang-py prettyprint-override"><code>lead = []
sum1 , sum2 = 0 , 0
for i in range(int(input())):
    a1 , a2 = map(int, input().split())
    sum1 += a1
    sum2 += a2
    if sum1&gt;sum2:
        lead.append([sum1 - sum2 , 1])
    else:
        lead.append([sum2 - sum1 , 2])

ans = max(lead)
print(ans[1],ans[0])
</code></pre>

<p>Thanks.</p>
