How to select and order numbers for which I know the sum

后端 未结 0 1584
借酒劲吻你
借酒劲吻你 2020-12-10 21:47

import random

list1=[3,2,6,1,5,4] target=7

sampled_list=[] listofthis=[]

def pairsum(list1,target):

while True:
    a=random.choice(list1         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题