Hi, I'm new in Python, so excuse me if the question may be too simple for someone.
I have the following code:
from itertools import product
for a,b in product(range(0,10), range(a,10)):
print (a,b)
but it does not work, a message error tell me that in the range is not defined.
It must work like this:
for a in range (0,10):
for b in range (a,10):
print(a,b)
I can't use the second solution because I need to nest variable multiple loops.
0 Answer(s)