over 6 years ago
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.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Answer(s)