filename = r'''C:\Users\Python\Python35-32\lessons\charper_7\exp_1_read_text_from_file\charper_7\test.txt'''
try:
text_file = open( filename, "r", encoding = 'utf-8')
print(text_file.read(2))
except OSError as f:
print('ERROR: ',f)
filename = r'C:\Users\Python\Python35-32\lessons\charper_7\exp_1_read_text_from_file\charper_7\test.txt'
with open( filename, "r", encoding = 'utf-8') as text_file:
print(text_file.read(2))