0
is it posiblle to make this more compact?
file1=open(filename1, 'r', encoding='utf-8') file2=open(filename2, 'r', encoding='utf-8') text1=file1.read() text2=file2.read() file1.close() file2.close()
4 Answers
+ 1
thank you, i have 1 question tho.
we dont need to close the file if we open it using 'with'?
0
thank you :)