[Solve] Note: Must be done in python 7.8 LAB: Word frequencies (lists) Write a program that first reads in the name of an

Note: Must be done in python
7.8 LAB: Word frequencies (lists)
Write a program that first reads in the name of an input file and then reads the file using the csv. reader method. The file contains a list of words separated by commas. Your program should output the words and their frequencies (the number of times each word appears in the file) without any duplicates.
Ex: If the input is:
input1.csv
and the contents of input1.csv are:
, cat, man, hey, dog, boy, , man, cat, woman, dog, Cat, hey, boy
the output is:
1
cat 2
man 2
hey 2
dog 2
boy 2
1
woman 1
Cat 1
Note: There is a newline at the end of the output, and input1.csv is available to download.

The correct answer has not yet been found for the question. Our moderators are looking for the most suitable solutions for you. Could you share your comments with us for the answer to this question?

Leave a Reply

Your email address will not be published. Required fields are marked *