This is my code so far I'm trying to compare the files given by the user and printing if the content inside both files is the same. If it is the same string content I would like to print Yes
if it's not, print No
along with the words inside both files.
print ('Enter the first file name: ', end = '')
FIRST_FILE = input()
print ('Enter the second file name: ', end = '')
SECOND_FILE = input()
if SECOND_FILE == line in FIRST_FILE:
print('Yes')
else:
print('No')
infile = open('one.txt', 'w')
infile.write('Hello')
infile.close()
infile2 = open('SameAsone.txt', 'w')
infile2.write('Hello')
infile2.close()
infile3 = open('DifferentFromone.txt', 'w')
infile3.write('Bye')
infile3.close()
Thanks.