In Python I have a series of nested for
loops in this format:
for i in range(2):
for j in range(2):
for k in range(2):
and so on, all with the same range. Is there an easy way to simplify this into something like: for i, j, k in range(2)? I have been looking for a way to condense it down to one line and haven't found one.