哪位会Python大神能帮帮忙啊啊,编写一个程序downloadthefilemovie-titles.txtfromStream.ThisisNOTthesameasmovies.txtfromAssignment2A.Yourtaskistoreadthisfile,cleanitupbyremov...
哪位会Python大神能帮帮忙啊啊,编写一个程序download the file movie-titles.txt from Stream. This is NOT the same as movies.txt from Assignment 2A.Your task is to read this file, clean it up by removing the year at the end of each line, and punctuation.Then find and display following statistics:1.the number of non-empty lines in the file2.the total number of words in the movie titles3.the average number of words per title.4.the number of unique words in the titles. Ignore case differences, so The becomes the5.the number of duplicate wordsThen1.sort the list of unique words, and2.display the first 5 words, words 50-54, words 500-504, and the last 5 words.Suggestions:To calculate the above, you'll need to:•remove the year and brackets from each line•replace each of the following characters•force all the words to lower-case
展开