Loop through two lists simultaneously: use index

To iterate through two lists with the same index and get a pair of each list, you can use the following code:

X = [1, 2, 3],
Y = [a, b, c];

for(int i = 0; i < X.length; i++) {
  int ElemX = X[i];
  int ElemY = Y[i];
  
  // Do something with the pair
}

The issue is that the code provided is in Java syntax, but the user wants to use the Markdown format.

To iterate through two lists and get a pair of elements with the same index, you can use the following code in Markdown:

X = [1, 2, 3]
Y = ['a', 'b', 'c']

for i in range(len(X)):
    ElemX = X[i]
    ElemY = Y[i]
  
    # Do something with the pair

Note that Markdown is not a programming language, but a markup language used for formatting text. Therefore, the code provided above is an example of how you can represent the code in a Markdown document.