'''
下载一首英文的歌词或文章,统计单词出现的次数,将所有,.?!替换为空格,将所有大写转换为小写。
'''
sr='''You're ?insecure
Don't know what for
You're turning heads through the door
Don't need make-up
to cover up
Being the way that you are is enough
Everyone else in the room can see it
Everyone else but you
Baby you light up my world like nobody else
The way that you flip your hair gets me overwhelmed
But when you smile at the ground it ain't hard to tell
You don't know Oh oh
You don't know you're beautiful
If only you saw what I can see
You'll understand why I want you so desperately
Right now I'm looking at you and I can't believe
You don't know Oh !oh
You don't know you're beautiful Oh oh
That's what makes you beautiful
So c-come on
You got it wrong
To prove I'm ,right '''

print(sr.count('you'))
for i in sr:
    sr=sr.replace(',','/t ')
    sr=sr.replace('!','/t ')
    sr=sr.replace('?','/t ')
print(sr)
for i in sr:
    sr=sr.upper()
print(sr)
      

下载一首英文的歌词或文章,统计单词出现的次数,将所有,.?!替换为空格,将所有大写转换为小写。…插图

下载一首英文的歌词或文章,统计单词出现的次数,将所有,.?!替换为空格,将所有大写转换为小写。…插图1

 

转载于:https://www.cnblogs.com/garxiu/p/7542085.html

原文链接:https://blog.csdn.net/weixin_30342827/article/details/95756729

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《下载一首英文的歌词或文章,统计单词出现的次数,将所有,.?!替换为空格,将所有大写转换为小写。…
   

还没有人抢沙发呢~