Given multiple list of possibly varying length, I want to iterate over all combinations of values, one item from each list. For example:
first = [1, 5, 8]
second = [0.5, 4]
Then I want the output of to be:
combined = [(1, 0.5), (1, 4), (5, 0.5), (5, 4), (8, 0.5), (8, 4)]
I want to iterate over the combined list. How do I get this done?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…