python大神的程序_哪位会Python大神能帮帮忙啊啊,编写一个程序

求助者寻求Python专家帮助编写程序,任务包括从Stream下载movie-titles.txt文件,清理数据,移除年份和标点,统计非空行数、总单词数、平均单词数、独特单词数及重复单词。还需按顺序展示首尾单词和特定区间。
摘要由CSDN通过智能技术生成

哪位会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

展开

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值