首页 > 其他 > 详细

大作业

时间:2018-06-13 22:12:11      阅读:263      评论:0      收藏:0      [点我收藏+]
f = open(歌词.txt,mode=r,encoding=utf-8)
fText = f.read()
f.close()
print(fText)
If I got down on my knees
 And I pleaded with you
 If I cross a million oceans
 Just to be with you
 Would you ever
 let me down
 If I climbed the highest mountain
 Just to hold you tight
 If I said that I would loved you
 Every single night
 Well Im sorry if it sounds kind of sad
 Its just that worried
 Im so worried
 That youll let me down
 Because I love you
 love you love you
 So dont you let me down
 If I swan the longest river
 Just to call your name
 If I said the way I fell for you
 Would never change
 Would you ever fool around
 Yes Im so worried
 Yes I love you
 Dont you let me down
 I love you love you
f = open(geci.txt,mode=r,encoding=utf-8)
fText = f.read()
f.close()
print(fText)

replaceList = [?,!,,,.]
for c in replaceList:
    fText = fText.replace(c, )

print(fText)
print(fText.split( ))
If I got down on my knees
 And I pleaded with you
 If I cross a million oceans
 Just to be with you
 Would you ever
 let me down
 If I climbed the highest mountain
 Just to hold you tight
 If I said that I would loved you
 Every single night
 Well Im sorry if it sounds kind of sad
 Its just that worried
 Im so worried
 That youll let me down
 Because I love you
 love you love you
 So dont you let me down
 If I swan the longest river
 Just to call your name
 If I said the way I fell for you
 Would never change
 Would you ever fool around
 Yes Im so worried
 Yes I love you
 Dont you let me down
 I love you love you
If I got down on my knees
 And I pleaded with you
 If I cross a million oceans
 Just to be with you
 Would you ever
 let me down
 If I climbed the highest mountain
 Just to hold you tight
 If I said that I would loved you
 Every single night
 Well Im sorry if it sounds kind of sad
 Its just that worried
 Im so worried
 That youll let me down
 Because I love you
 love you love you
 So dont you let me down
 If I swan the longest river
 Just to call your name
 If I said the way I fell for you
 Would never change
 Would you ever fool around
 Yes Im so worried
 Yes I love you
 Dont you let me down
 I love you love you
[\ufeffIf, I, got, down, on, my, knees\n, And, I, pleaded, with, you\n, If, I, cross, a, million, oceans\n, Just, to, be, with, you\n, Would, you, ever\n, let, me, down\n, If, I, climbed, the, highest, mountain\n, Just, to, hold, you, tight\n, If, I, said, that, I, would, loved, you\n, Every, single, night\n, Well, "I‘m", sorry, if, it, sounds, kind, of, sad\n, "It‘s", just, that, worried\n, "I‘m", so, worried\n, That, "you‘ll", let, me, down\n, Because, I, love, you\n, love, you, love, you\n, So, "don‘t", you, let, me, down\n, If, I, swan, the, longest, river\n, Just, to, call, your, name\n, If, I, said, the, way, I, fell, for, you\n, Would, never, change\n, Would, you, ever, fool, around\n, Yes, "I‘m", so, worried\n, Yes, I, love, you\n, "Don‘t", you, let, me, down\n, I, love, you, love, you]

Process finished with exit code 0

 

大作业

原文:https://www.cnblogs.com/Millie/p/9180344.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!