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

'''
下载一首英文的歌词或文章,统计单词出现的次数,将所有,.?!替换为空格,将所有大写转换为小写。
'''
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)
      

 

posted on 2017-09-18 11:10  01-李嘉秀  阅读(245)  评论(0编辑  收藏  举报

导航