I have 2 dimensional list created at runtime (the number of entries in either dimension is unknown). For example:
long_list = [ [2, 3, 6], [3, 7, 9] ]
I want to iterate through it by getting the ith entry from each list inside the long_list:
for entry in long_list.iter():
#entry will be [2, 3] then [3, 7] then [6, 9]
I know that Python's itertools.izip_longest() method does this. Except it takes in a different variable for each list.
itertools.izip_longest(var1, var2, var3 ...)
So, how do I split my long_list into a different variable for each list and then call izip_longest() with all those variable at runtime?