- def fun133(list_x):
- result = []
- for i in range(min(list_x),max(list_x)+1):
- result.append([i,list_x.count(i)])
- return result
- if __name__ == '__main__':
- print(fun133([12, 1, 3, 19, 0, 1, 16, 8, 19, 10, 6, 10, 0, 4, 3, 18, 2, 18, 17, 6, 16, 19, 12, 18, 4, 4, 16, 12, 13, 11, 0, 0, 12, 7, 10, 2, 7, 12, 4, 18, 13, 18, 16, 17, 14, 12, 1, 12, 4, 14, 8, 18, 4, 12, 10, 1, 18, 7, 2, 9, 3, 11, 12, 2, 9, 13, 12, 18, 15, 1, 9, 5, 11, 6, 12, 9, 16, 14, 18, 0, 15, 4, 17, 5, 1, 13, 0, 10, 0, 6, 16, 15, 3, 16, 20, 18, 4, 18, 16, 3]))
复制代码 |