python 排列组合

时间:2021-03-08 22:19:38   收藏:0   阅读:36

code

from itertools import permutations
result=[int("".join(i)) for i in list(permutations(["1","2","3","4"],3))]
print(len(result),result)

 

 

 

 

 

 

 

 

原文:https://www.cnblogs.com/sea-stream/p/14502358.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!