You are to write a program that deals with the words common to two or more files whose names are supplied on the command line. All the code will be in the file common_words.py. A command to execute the program would look like this:
python common_words.py filename1 filename2
Of course, "python" may need to be "python3" or "python3.6" depending on your python 3 version.
For the purpose of this assignment, the words of a string are those separated by whitespace.
So your program should create a list of words for each file; then determine the list of words that occur in all the files.
You will then print that list. Your output should look like this:
COMMON WORDS
word1 word2 …
followed by a blank line. Then, for each filename, you should list the other filenames for which the common words appear in the same order. If a filename appears in a prior list, skip it.
Assuming the filename arguments were filename1, filename2, filename3, filename4, filename5, filename6, the following would be a possible output for this part.
filename1: filename3 filename6
filename2: filename5
filename4:
You should submit a file named, of course, common_words.py