Aug-22-2019, 05:37 AM
It's unclear to me what you want to do. Do you want to iterate through all the values in the second range for each value in the first (or vice versa)? In that case, you can nest the loops. Do you want to iterate over pairs of values from the two sequences? If so, you can use
zip
(docs here):>>> for x, y in zip([1, 2, 3], [4, 5, 6]): ... print(x, y) ... 1 4 2 5 3 6 >>>If neither of these things, please explain more.