Created
July 31, 2020 04:34
-
-
Save e96031413/5ced031341db84de9f7a62b3415cdb26 to your computer and use it in GitHub Desktop.
使用itertools.permutations(x)列出所有element的可能組合
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#使用itertools.permutations(x)列出所有element的可能組合 | |
import itertools | |
x = ['1','2','3'] | |
perm = itertools.permutations(x) | |
for i in perm: | |
print(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment