Re: Quick nested loop syntax?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terry Reedy

    Re: Quick nested loop syntax?

    Johannes Bauer wrote:
    Hi group,
    >
    if I remember correctly, wasn't there a way to quickly iterate through
    nested loops? Something like
    >
    a = { "a", "b", "c" }
    b = { 4, 9, 13}
    for (x, y) in someoperator(a, b):
    print(x, y)
    from itertools import product
    a = { "a", "b", "c" }
    b = { 4, 9, 13}
    for (x, y) in product(a, b):
    print(x, y)

Working...