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

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

 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值