How can I get rid of multiple nested for loops?
-
29-10-2019 - |
문제
I have a Python (3.2) script that searches for points with a property that I want. But it has this ugly part:
for x in range(0,p):
for y in range(0,p):
for z in range(0,p):
for s in range(0,p):
for t in range(0,p):
for w in range(0,p):
for u in range(0,p):
if isagoodpoint(x,y,z,s,t,w,u,p):
print(x,y,z,s,t,w,u)
else:
pass
Is there something I can do so that it looks a bit better?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow