I've been writing the code for lines and I think i've finally started to figure it out. I'm having some trouble with making the lines into a variable and then comparing them. I'm not sure that this code works, so if anyone can help me fix it or just general improvements, please tell me.
file1 = open("file1.txt", "r")
file2 = open("file2.txt", "r")
for line in file1:
x = line
for line in file2:
y = line
if x = y:
return x
return y
file1.close()
file2.close()