会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
底部
天宝老爹
博客园
首页
新随笔
管理
2021年5月24日
Python:列出列表中所有元素的组合可能
摘要: Python:列出列表中所有元素的组合可能 from itertools import combinationsdef combine(temp_list, n): '''根据n获得列表中的所有可能组合(n个元素为一组)''' temp_list2 = [] for c in combination
阅读全文
posted @ 2021-05-24 17:14 逐梦~前行
阅读(2610)
评论(0)
推荐(0)
编辑