python-codecs.open()使用举例
代码:
1 import codecs 2 from unidecode import unidecode 3 4 def main(): 5 fullFilename="123.txt" 6 inFID=codecs.open(fullFilename,'r','utf-8') 7 ALines = inFID.readlines() 8 for k in range(len(ALines)): 9 ALines[k] = unidecode(ALines[k]) 10 print(ALines[k]) 11 inFID.close() 12 13 main()
参考:
http://blog.csdn.net/suofiya2008/article/details/5579413
本文来自博客园,作者:月色深潭,交流群:733423266,转载请注明原文链接:https://www.cnblogs.com/moonpool/p/5694980.html