随机数想加PYTHON
发布时间:2020-12-20 10:39:10 所属栏目:Python 来源:网络整理
导读:import itertoolslist1 =[14140,13260,14300,14500,14040,13940,13620,13980,17280,13580,13740 ]mylist = list(itertools.permutations(list1,4 ))a = set() for i in mylist: ii = sum(i) if ii==59400 : iii = tuple(sorted(list(i))) a.add(iii) print (
import itertools list1=[14140,13260,14300,14500,14040,13940,13620,13980,17280,13580,13740] mylist = list(itertools.permutations(list1,4)) a=set() for i in mylist: ii=sum(i) if ii==59400: iii=tuple(sorted(list(i))) a.add(iii) print(a) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |