3
파일에서 읽고 utf-8에 저장하는 Python
파일에서 읽기, 문자열 처리 및 UTF-8 파일에 저장하는 데 문제가 있습니다. 다음은 코드입니다. try: filehandle = open(filename,"r") except: print("Could not open file " + filename) quit() text = filehandle.read() filehandle.close() 그런 다음 가변 텍스트를 처리합니다. 그리고 try: writer = open(output,"w") except: print("Could not open file " + output) quit() #data …