Amaury Forgeot d'Arc added the comment: permutations() returns a generator. If you consume it with list(), the second time will return the empty list.
Use list(permutations(...)) if you plan to use the result multiple times. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19423> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com