Learning immediately: https://edu.csdn.net/course/play/24797/282196?utm_source=blogtoedu
the try: # f = open ( 'Chinese .txt', 'W') # Q binary format to read the contents of the file f = open ( 'Chinese .txt', 'RB', True) Data reached, f.read = () Print ( STR (Data, 'UTF8')) the except OSError AS E: Print (E) Print (e.args) Print (e.errno) Print (e.strerror) the finally: IF 'F' in Globals (): f.close () # the try: # # F = Open ( 'Chinese .txt', 'W') # = F Open ( 'Chinese .txt', 'R & lt +', True, 'UTF8') # = Data reached, f.read () Print # (Data) # # AS OSError the except E: # Print (E) # Print (e.args) # Print (E.errno) # print(e.strerror) # finally: # if 'f' in globals(): # f.close()