Question: Im writing a program that takes the text from 2 files and compares their similar/different/etc words. To do this accurately I need to make all

Im writing a program that takes the text from 2 files and compares their similar/different/etc words. To do this accurately I need to make all text in both files lowercase. Where do I put the .lower() function?
filel-input ("Enter file: ") file2-input ("Enter file: ") infilel-open (filel, "r") infile2-open (file2, "r") filelword-[] file2word for line in infile1: for word in line.split (): filelword.append (word) filelset-set (filelword) 15 16 17 18 for line in infile2: for word in line.split (): file2word.append (word) file2set-set (file2word) 20 21 print("Unique words in file 1:") for i in filelset: 23 24 print(i)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
