There are already many answers to 'how to iterate through 2 lists in parallel'. However, I am trying to figure out how to iterate through an arbitrary amount of lists.
For example, the following requires me to know beforehand how many lists i have
for f, b in zip(foo, bar):
print(f, b)
But I am using os.listdir() to get an N amount of subfolders, and then I want to iterate through all those subfolder in parallel.
for (every nth element) in (each subfolder found):
do something
Currently I have always done this manually but I'd really like to know how to do this more elegantly, i.e. without any knowledge of how many lists to iterate through.
Thanks!