小贤啊哦
发表于 2020-5-7 23:21:01
def fun87(num):
alist=
s=[]
for i in range(len(alist)):
for j in range(i+1,len(alist)):
if alist+alist==num:
s.append(,alist])
return s
kinkon
发表于 2022-3-1 08:39:46
def fun(mylist, target):
s = set()
res = list()
for a in mylist:
t = target - a
if t in s:
res.append()
s.add(a)
return res
mylist =
target = 9
print(fun(mylist, target))