Respuesta :

Answer:

first = input("enter first file name: ")

second = input("enter second file name: ")

file_one = open(first, 'r')

file_two = open(second, 'r')

if file_one.read() == file_two.read():

   print("Both files are the same")

else:

   print("Different files")

file_one.close()

file_two.close()

Explanation:

The python module above is a procedural program. The first two lines ask for user inputs for both file names in string, then the files are opened and compared with the if-statement. At the end of the program, the files are closed to avoid leakage.