python get the next element in a list of lists simultaneously code example
Example 1: looping through two lists python
for f, b in zip(foo, bar):
print(f, b)
Example 2: how to select number by twos in a list python next to each
A = [1, 2, 3, 4, 5]
for i in range(len(A) - 1):
value = A[i:i+2]