期末综合大作业

#1.
leoFile=open('leo.txt','r',)
leoText=leoFile.read()
leoFile.close()
print(leoText)
#2.
replaceList=[',','.'"'",'\n']
for c in replaceList:
    leoText=leoText.replace(c,' ')
print(leoText)
#3.
print(leoText.split(' '))
leoList=leoText.split(' ')  #列表:出现的单词序列
print(leoList.count('Christmas'))
#4.
leoSet=set(leoList) #集合:有哪些单词
print(leoList)

leoDict={} #字典:每个单词的统计次数
for word in leoSet:
    leoDict[word]=leoList.count(word)
print(leoDict)
for d in leoDict:
    print(d,leoDict[d])
#5.
wordCountList=list(leoDict.items()) #字典转换成列表
print(wordCountList)
wordCountList.sort(key=lambda x:x[1],reverse=True) #进行排序
print(wordCountList)
#6.
for i in range(20):
    print(wordCountList[i])
#7.
leoCountFile=open('leoCount.txt','a')
for i in range(len(wordCountList)):
    leoCountFile.write(str(wordCountList[i][1])+' '+wordCountList[i][0]+'\n')
leoCountFile.close()
There's a hero 
If you look inside your heart
You don't have to be afraid?
Of what you are
There's an answer
If you reach into your soul
And the sorrow that you know
Will melt away
And then a hero comes along
With the strength to carry on
And you cast your fears aside
And you know you can survive
So when you feel like hope is gone
Look inside you and be strong
And you'll finally see the truth
That a hero lies in you
It's a long road
When you face the world alone
No one reaches out a hand
For you to hold
You can find love
If you search within yourself
And the emptiness you felt
Will disappear
Lord knows
Dreams are hard to follow
But don't let anyone
Tear them away
Hold on
There will be tomorrow
In time
You'll find the way
When I am down and, oh my soul, so weary.
When troubles come and my heart burdened be.
Then, I am still and wait here in the silence.
Until you come and sit a while with me.
You raise me up, so I can stand on mountains .
You raise me up,to walk on stormy seas.
I am strong when I am on your shoulders.
You raise me up,to more than I can be.
There is no life -
no life without its hunger.
Each restless heart beats so imperfectly.
But when you come and I am filled with wonder.
Sometimes, I think I glimpse eternity.
You raise me up,so I can stand on mountains .
You raise me up,to walk on stormy seas.
I am strongwhen I am on your shoulders.
You raise me up,to more than I can be.

It's been a long day without you my friend
And I'll tell you all about it when I see you again
We've come a long way from where we began
Oh I'll tell you all about it when I see you again
When I see you again

Damn, who knew all the planes we flew
Good things we've been through
That I'll be standing right here
Talking to you about another path
I know we loved to hit the road and laugh
But something told me that it wouldn't last
Had to switch up look at things different see the bigger picture
Those were the days hard work forever pays
Now I see you win the better place
How could we not talk about family when family's all that we got?
Everything I went through you were standing there by my side
And now you gonna be with me for the last ride

It's been a long day without you my friend
And I'll tell you all about it when I see you again
We've come a long way from where we began
Oh I'll tell you all about it when I see you again
When I see you again

First you both go out your way
And the vibe is feeling strong and what's small turn to a friendship
Turn into a bond and that bond will never be broken and the love will never get lost
And when brotherhood come first then the line
Will never be crossed established it on our own
When that line had to be drawn and that line is what
We reach so remember me when I'm gone
How could we not talk about family when family's all that we got?
Everything I went through you were standing there by my side
And now you gonna be with me for the last ride

So let the light guide your way
Hold every memory as you go
And every road you take will always lead you home
Hoo~
It's been a long day without you my friend
And I'll tell you all about it when I see you again
We've come a long way from where we began
Oh I'll tell you all about it when I see you again
When I see you again
When I see you again, see you again
When I see you again

The club isn't the best place to find a lover
So the bar is where I go
Me and my friends at the table doing shots
Drinking faster and then we talk slow
You come over and start up a conversation with just me
And trust me I'll give it a chance now
Take my hand, stop, Put Van The Man on the jukebox
And then we start to dance, and now I'm singing like
Girl, you know I want your love
Your love was handmade for somebody like me
Come on now, follow my lead
I may be crazy, don't mind me, say
Boy, let's not talk too much
Grab on my waist and put that body on me
Come on now, follow my lead
Come—come on now, follow my lead
I'm in love with the shape of you
We push and pull like a magnet do
Although my heart is falling too
I'm in love with your body
And last night you were in my room
And now my bedsheets smell like you
Every day discovering something brand new
I'm in love with your body
I'm in love with your body
I'm in love with your body
I'm in love with your body
Every day discovering something brand new
I'm in love with the shape of you
One week in we let the story begin
We're going out on our first date
But you and me are thrifty so go all you can eat
Fill up your bag and I fill up a plate
We talk for hours and hours about the sweet and the sour
And how your family is doin' okay
And leave and get in a taxi, we kiss in the backseat
Tell the driver make the radio play, and I'm singing like
Girl, you know I want your love
Your love was handmade for somebody like me
Come on now, follow my lead
I may be crazy, don't mind me, say
Boy, let's not talk too much
Grab on my waist and put that body on me
Come on now, follow my lead
Come—come on now, follow my lead
I'm in love with the shape of you
We push and pull like a magnet do
Although my heart is falling too
I'm in love with your body
And last night you were in my room
And now my bedsheets smell like you
Every day discovering something brand new
I'm in love with your body
I'm in love with your body
I'm in love with your body
Every day discovering something brand new
I'm in love with the shape of you
Come on, be my baby, come on
I'm in love with the shape of you
We push and pull like a magnet too
Although my heart is falling too
I'm in love with your body
And last night you were in my room
And now my bedsheets smell like you
Every day discovering something brand new
I'm in love with your body
Come on, be my baby, come on
Come on, be my baby, come on
I'm in love with your body
Come on, be my baby, come on
Come on, be my baby, come on
I'm in love with your body
Come on, be my baby, come on
Come on, be my baby, come on
I'm in love with your body
Every day discovering something brand new
I'm in love with the shape of you
If you ever find yourself stuck in the middle of the sea,
I'llsail the world to find you
If you ever find yourself lost in the dark and you can't see,
I'llbe the light to guide you
Find out what we're made of
What we are called to help our friends in need
You can count on me like 1 2 3
I'llbe there
And I know when I need it I can count on you like 4 3 2
And you'll be there cause that's what friends are supposed to do, oh yeah
Wooooh, wooooh yeah yeah
If you toss and you turn and you just can't fall asleep
I'llsing a song beside you
And if you ever forget how much you really mean to me
Everyday I will remind you ohh
Find out what we're made of
What we are called to help our friends in need
You can count on me like 1 2 3
I'llbe there
And I know when I need it I can count on you like 4 3 2
And you'll be there
Cause that's what friends are supposed to do, oh yeah
Wooooh, wooooh yeah yeah
You'll always have my shoulder when you cry
I'llnever let go
Never say goodbye you know
You can count on me like 1 2 3
I'llbe there
And I know when I need it I can count on you like 4 3 2
And you' ll be there
Cause that's what friends are supposed to do,
Count on me like 1 2 3
I'llbe there
And I know when I need it I can count on you like 4 3 2
And you'll be there
Cause that's what friends are supposed to do
Oh yeah
Wooooh, wooooh
You can count on me cos' I can count on you

When Christmas comes to town
La La La La .....
I’m wishing on a star
And trying to believe
That even though it’s far
He’ll find me Christmas Eve
I guess that Santa’s busy
Cause he’s never come around
I think of him when Christmas comes to town
When everyone comes home
With all this Christmas cheer
It’s hard to be alone
Putting up the Christmas tree with friends who come around
It’s so much fun when Christmas comes to town
Presents for the children wrapped in red and green
All the things I’ve heard about but never really seen
No one will be sleeping on the night of Christmas Eve
Hoping Santa’s on his way
Present for the children wrapped in red and green
All the things I’ve heard about but never really seen
No one will be sleeping on the night of Christmas Eve
Hoping Santa’s on his way
When santa’s sleigh bells ring
I listen all around
The herald angels sing
I never hear a sound
And all the dreams of children
Once lost will all be found
That’s all I want when Christmas comes to town

82
82 you
53 I
50 on
47 the
35 And
34 in
34 my
31 and
30 to
26 with
26 me
26 be
26 love
25 a
25 your
23 I'm
21 when
19 like
17 come
16 see
16 can
16 body
15 all
15 we
13 it
13 of
13 You
13 now
12 about
12 again
12 When
11 Come
11 up
10 know
10 there
10 that
9 are
9 is
9 count
9 Christmas
9 day
8 will
8 2
8 what
8 I'll
8 3
8 friends
8 way
7 something
7 find
7 am
7 yeah
7 for
7 never
7 follow
7 lead
7 so
7 baby
7 long
6 were
6 do
6 brand
6 new
6 Every
6 heart
6 If
6 talk
6 comes
6 raise
6 discovering
6 too
6 last
6 shape
6 need
6 tell
5 go
5 We
5 night
5 I'llbe
5 out
4 where
4 town
4 our
4 1
4 you'll
4 But
4 let
4 things
4 then
4 not
4 It's
4 much
4 Oh
4 La
4 don't
4 without
4 4
4 that's
4 supposed
4 been
4 Cause
3 hero
3 began
3 pull
3 Although
3 Eve
3 That
3 line
3 lost
3 family
3 oh
3 No
3 Santa’s
3 Will
3 So
3 friend
3 yourself
3 through
3 falling
3 road
3 We've
3 around
3 Wooooh
3 smell
3 children
3 ever
3 hard
3 from
3 be.
3 really
3 push
3 strong
3 say
3 room
3 bedsheets
3 standing
3 The
3 wooooh
3 one
3 want
3 magnet
2 Your
2 guide
2 Hold
2 look
2 here
2 hours
2 by
2 crazy
2 into
2 somebody
2 .
2 shoulders.
2 walk
2 can't
2 family's
2 What
2 hand
2 get
2 Find
2 green
2 just
2 light
2 how
2 have
2 went
2 How
2 singing
2 his
2 away
2 let's
2 Hoping
2 You'll
2 home
2 start
2 place
2 always
2 waist
2 Boy
2 There
2 called
2 mind
2 world
2 heard
2 red
2 think
2 soul
2 inside
2 handmade
2 gone
2 It’s
2 alone
2 stormy
2 every
2 gonna
2 Come—come
2 made
2 seas.
2 seen
2 side
2 reach
2 Grab
2 turn
2 help
2 I’ve
2 got?
2 may
2 who
2 wrapped
2 sleeping
2 Everything
2 was
2 but
2 With
2 All
2 ride
2 more
2 than
2 could
2 mountains
2 we're
2 Girl
2 at
2 life
2 stand
2 bond
2 put
2 first
2 no
1 Me
1 disappear
1 him
1 beside
1 Each
1 shots
1 For
1 lies
1 Drinking
1 felt
1 okay
1 trust
1 flew
1 told
1 stop
1 far
1 taxi
1 Man
1 One
1 chance
1 melt
1 if
1 strength
1 wishing
1 Fill
1 plate
1 memory
1 bag
1 days
1 Tell
1 conversation
1 along
1 found
1 sound
1 Present
1 work
1 I'llnever
1 crossed
1 Those
1 imperfectly.
1 ring
1 Now
1 dark
1 emptiness
1 Dreams
1 Count
1 wait
1 this
1 driver
1 guess
1 That’s
1 what's
1 stuck
1 cause
1 sleigh
1 brotherhood
1 shoulder
1 troubles
1 fill
1 survive
1 thrifty
1 middle
1 search
1 I'llsail
1 face
1 Putting
1 bigger
1 There's
1 slow
1 I'llsing
1 cast
1 me.
1 feeling
1 answer
1 cheer
1 goodbye
1 over
1 bar
1 listen
1 Sometimes
1 forever
1 silence.
1 anyone
1 Damn
1 hit
1 radio
1 -
1 play
1 take
1 asleep
1 hope
1 laugh
1 planes
1 knew
1 sour
1 sing
1 lover
1 beats
1 herald
1 isn't
1 eat
1 Good
1 restless
1 star
1 There's
1 hunger.
1 dreams
1 hear
1 give
1 tree
1 Talking
1 going
1 still
1 remind
1 sea
1 doin'
1 forget
1 he’s
1 cos'
1 kiss
1 backseat
1 bells
1 it’s
1 Van
1 First
1 date
1 even
1 sorrow
1 Tear
1 switch
1 mean
1 eternity.
1 ohh
1 as
1 Hoo~
1 dance
1 week
1 within
1 wouldn't
1 carry
1 down
1 own
1 believe
1 hold
1 make
1 doing
1 In
1 though
1 sit
1 santa’s
1 sweet
1 win
1 everyone
1 afraid?
1 time
1 We're
1 Take
1 cry
1 Of
1 finally
1 truth
1 Put
1 leave
1 filled
1 we've
1 fears
1 established
1 fun
1 Then
1 pays
1 different
1 club
1 picture
1 Everyday
1 them
1 better
1 story
1 Lord
1 vibe
1 faster
1 jukebox
1 you'
1 Once
1 Turn
1 busy
1 knows
1 remember
1 He’ll
1 path
1 drawn
1 burdened
1 Until
1 Presents
1 weary.
1 glimpse
1 small
1 Never
1 both
1 while
1 toss
1 had
1 right
1 table
1 tomorrow
1 friendship
1 begin
1 Had
1 another
1 song
1 an
1 wonder.
1 its
1 Look
1 angels
1 reaches
1 .....
1 trying
1 strongwhen
1 loved
1 fall
1 aside
1 feel
1 ll
1 I’m
1 broken
1 best

猜你喜欢

转载自www.cnblogs.com/tsukinaga/p/9167852.html