I currently have a bit of Python code that looks like this:
for set_k in data:
for tup_j in set_k:
for tup_l in tup_j:
The problem is, I'd like the number of nested for statements to differ based on user input. If I wanted to create a function which generated n number of for statements like those above, how might I go about doing that?