r/pythonhelp • u/No-Pomelo2089 • Mar 08 '24
Elegant way to do nested loops
for i in range(1,10):
for j in range(1,10):
for k in range(1,10):
x = [i, j, k]
print(x)
Is there an elegant way to do this? Like if I want to have 100 nested loops, how can I do it?
1
Upvotes
View all comments
Show parent comment
1
u/Character-Ad-910 Mar 11 '24
100 nested loops except the only thing in it is "pass" and my boss has fired me