Cần giúp đỡ dịch bài tập python
Có ai rành về python với tiếng anh giúp mình bài này với.
Write a Python program that asks user for the name of an input file. The program then
reads the content of the input file to count the frequency of each word appearing in the file
and write the word frequency in alphabetical order to an output file called frequency.txt.
Both the input and output file reside in the same directory with the Python file.
In this problem, a word is a sequence of alphanumeric and dash (“-“) characters. As an
example, there is only one word “men” in “men’s” because the apostrophe and the
character “s” it is not part of the word “men”. Furthermore, case difference is ignored, i.e.
both “House” and “house” are considered as “house”.
Hint: you may find the string string.punctuation and the function sorted() helpful.
Google dịch hộ bạn. Bạn tự làm để luyện khả năng tư duy nhé.