将关键词列表文件转成python的list
将关键词列表文件转成python的list
file_src = open('src.txt')file_dst = open('dst.txt','w+')
file_dst.write("[")
for line in file_src:
file_dst.write("'"+line[0:len(line)-1]+"',")
file_dst.write("]")
file_src.close()
file_dst.close()
作者:jingshishengxu
相关内容
- 暂无相关文章
评论关闭