首页 > 编程语言 > 详细

python 排列组合

时间:2021-03-08 22:19:38      阅读:32      评论:0      收藏:0      [点我收藏+]

code

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

 

 

 

 

 

 

 

 

python 排列组合

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!