python3 一個處理數據的案例

讀取文件,將每一行做爲列表的一個值,求每一個字符串出現的次數,以及有哪些字符串。 寫入文件,按次數大小排序,次數後面對應着字符串web # -*- coding:utf-8 -*- input1 = open('jpc.txt', 'r') output1 = open('out.txt', 'w') list_of_all_the_lines = input1.read() a = list_
相關文章
相關標籤/搜索