用Python语言处理lrc文件中的不重复单词数量
发布时间
阅读量:
阅读量
# coding=utf-8
import os
import concurrent
import threading
import asyncio
gPool = concurrent.futures.ThreadPoolExecutor(5)
gLock = threading.Lock()
async def dealOne(path):
words = {}
with open(path, "r") as f:
while True:
line = f.readline()
if not line:
break
idx = line.find("]")
if idx != -1:
text = line[idx+1:].strip().strip(";").strip()
sp = text.split()
全部评论 (0)
还没有任何评论哟~
