iterate through two lists element by element

I want to iterate through two lists, (listA and listB) element by element.
listA element 0, then listB element 0, then ListA element 1, then listB element 1 etc.
i tryed to achef this trough a nested for loop (see example).
But this code starts with listA element 0, but then all ellements of` listB will pass.
What do i have to change to iterate element by element?

 for (int i = 0; i< listA.Count; i++)
        {
            placeHolderPosition = ListA*;*

Debug.Log(“placeholderpositie” + ListA);

for (int t = 0; t<listB.Count; t++)
{

bookPosition = listB[t];
Debug.Log(“boek” + listB);
}

}

//float dist = Vector3.Distance(placeHolderPosition, bookPosition);
//Debug.Log("Distance to other: " + dist);
}

Just iterate as normal using the greater of the two list counts (if they don’t match) and then compare only if the iterator continues to remain less than both list counts, breaking as soon as it fails to save on iterations.

EDIT: you can use Mathf.Min() instead of Max so that you don’t need the if check and break

    for(int i = 0; i<Mathf.Min(listA.Count,listB.Count);i++)
    {
            float dist = (listA _- listB*).magnitude;*_

//play with the dist here
}