Florian Bruhin <python....@the-compiler.org> added the comment:
This is not a bug. itertools.product returns an iterator: https://docs.python.org/3/glossary.html#term-iterator Quoting from there: > [...] every iterator is also iterable and may be used in most places where > other iterables are accepted. One notable exception is code which attempts > multiple iteration passes. A container object (such as a list) produces a > fresh new iterator each time you pass it to the iter() function or use it in > a for loop. Attempting this with an iterator will just return the same > exhausted iterator object used in the previous iteration pass, making it > appear like an empty container. ---------- nosy: +The Compiler _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43450> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com