我使用计算列表中项目的出现次数
timesCrime = Counter(districts)
这给了我这个:
Counter({3: 1575, 2: 1462, 6: 1359, 4: 1161, 5: 1159, 1: 868})
我想分离列表项的部分(例如3和1575)并将它们存储在列表列表中.我该怎么做呢?
python count
count ×1
python ×1