Skip to content

Instantly share code, notes, and snippets.

@e96031413
Created July 31, 2020 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e96031413/5ced031341db84de9f7a62b3415cdb26 to your computer and use it in GitHub Desktop.
Save e96031413/5ced031341db84de9f7a62b3415cdb26 to your computer and use it in GitHub Desktop.
使用itertools.permutations(x)列出所有element的可能組合
#使用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