代码如下:
def fun1(set1):
a = []
b = []
for i in set1:
if i > 66:
a.append(i)
else:
b.append(i)
dic = {‘k1’:a,‘k2’:b}
print(dic)
list1 = [11,22,33,44,55,66,77,88,99,90,]
fun1(list1)
代码如下:
def fun1(set1):
a = []
b = []
for i in set1:
if i > 66:
a.append(i)
else:
b.append(i)
dic = {‘k1’:a,‘k2’:b}
print(dic)
list1 = [11,22,33,44,55,66,77,88,99,90,]
fun1(list1)