'how can I make the resulting combinations appear in a column without brackets, without commas and without spaces? [closed]
import itertools
val = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
perm_set = itertools.permutations(val, 8)
for i in perm_set:
print(i)
Solution 1:[1]
Not sure if this is what you're looking for but does this work?
import itertools
val = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
perm_set = itertools.permutations(val, 8)
for i in perm_set:
print(*i, sep="") # Edited as recommended by @ddejohn
Output:
12345678
12345679
...
12345879
12345870
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
