It's quite straightforward to just compute j from i:
for i in xrange(limit1):
l.append('First index: %d, Second index: %d' % (i, 2*i))
l.append('First index: %d, Second index: %d' % (i, 2*i+1))
This assumes limit2 is twice limit1. If that isn't always the case, you can add an additional check:
for i in xrange(limit1):
if 2*i >= limit2:
break
l.append('First index: %d, Second index: %d' % (i, 2*i))
l.append('First index: %d, Second index: %d' % (i, 2*i+1))
or compute which limit to use up front:
for i in xrange(min(limit1, (limit2 + 1)//2)):
though as you can see, the limit computation may be error-prone.
Note that if limit2 isn't a multiple of 2, your code may emit an entry for j == limit2:
>>> lists = []
>>> i = 0
>>> j = 0
>>> limit1 = 2
>>> limit2 = 3
>>> while (i < limit1 and j < limit2):
... lists.append ('First index: %d, Second index: %d' % (i, j))
... j += 1
... lists.append ('First index: %d, Second index: %d' % (i, j))
... i += 1
... j += 1
...
>>> for i in lists:
... print (i)
...
First index: 0, Second index: 0
First index: 0, Second index: 1
First index: 1, Second index: 2
First index: 1, Second index: 3
If this isn't desired, we can rearrange the loop to go by j instead of i:
for j in xrange(min(limit2, limit1*2)):
l.append('First index: %d, Second index: %d' % (j//2, j))
listssays that that variable consists of multiple lists, but it doesn't. It's just a list of ints. It'd probably be a good idea to use a different name.