Tuple index out of range in Python
<pre><code>def max_logged_in(interval_lst,T):
    startArr, endArr = zip(*interval_lst)
    i = 0
    j = 0
    maxOverlap = 0
    currentOverlap = 0
    while (i&lt;T and j&lt;T):
        if (startArr[i] &lt; endArr[j]):
            currentOverlap = currentOverlap + 1
            maxOverlap = max(maxOverlap, currentOverlap)
            i = i + 1
        else:
            currentOverlap = currentOverlap - 1
            j = j + 1
</code></pre>

<p>The code is supposed to run through the two arrays and find the max overlap give a list such as <code>[(5,15), (18,25), (3,12), (4, 11), (1,15), (18,19)]</code> in the given time (<code>T</code>).
Running this code is giving me a tuple index error. I can't seem to figure out why it is giving me an index error.</p>