Answers for "itertools permutations exceeds memory"

1

python itertools.permutations use too much memory

a = [1, 2, 3]
n = 3
heapPermutation(a, n, n)
print()

perm_iterator = itertools.permutations(a)

for item in perm_iterator:
    print(item)
Posted by: Guest on February-14-2021

Python Answers by Framework

Browse Popular Code Answers by Language