标签:encode cti div name txt pen ret join 文件处理
文件打开
1 contents = open("file_name.txt","rb").read().decode("gbk").encode("utf8")
1 def open_dict(Dict, path): 2 paths = os.path.join(path,Dict) 3 dictionary = open(paths,"rb").read().decode("utf8") 4 return(dictionary.split("\n"))
标签:encode cti div name txt pen ret join 文件处理
原文地址:http://www.cnblogs.com/250apples/p/7745900.html