#pystyle with open("test.txt", encoding = 'utf-8') as f: file = f.read() #classic file = open("file.txt") file.close()