标签:coding class code src python img div span inf
#-*-coding:utf-8-*- ‘‘‘ ‘‘‘ li = [11,22,33,44,55,66,77,88,99] dic = {} l_greater = [] l_smaller = [] for i in li: if i ==66: continue if i>66: l_greater.append(i) else: l_smaller.append(i) print(l_greater) print(l_smaller) # 放到字典里 dic.setdefault(‘k1‘,l_smaller) dic.setdefault(‘k2‘,l_greater) print(dic)
标签:coding class code src python img div span inf
原文地址:https://www.cnblogs.com/sunnybowen/p/10209550.html