• 组合数据类型,英文词频统计


    sunstr = '''Girl I can't notice but to, notice you, noticing me
    From across the room I can see it and can't
    Stop myself from looking and noticing you, noticing me
    Watch out I've seen her type before
    That girl is so dangerous
    That girl is so dangerous
    That girl is a bad girl, I've seen her type before
    She's so dangerous
    That girl is so dangerous
    That girl is a bad girl, yeah
    
    Oh yeah that's her the big dog tryin' to get her little kitty to purr
    Ex-man lookin' at me like I'm Lucifer
    Cause he knows I will deal with his case yes sir!
    If I was the last man I earth
    I would only take that girl end of search
    She give a new definition to the word curve
    Got chicks in the strip club envyin' her
    Body's like weapon, a mass irruptions
    See the glad on that phat obstruction
    Tongue game give a new type of seduction
    
    Girl I can't notice but to, notice you, noticing me
    From across the room I can see it and can't
    Stop myself from looking and noticing you, noticing me
    Watch out I've seen her type before
    That girl is so dangerous
    That girl is so dangerous
    That girl is a bad girl, I've seen her type before
    She's so dangerous
    That girl is so dangerous
    That girl is a bad girl, yeah
    
    Oh, bad to the bone, everything locked like a two three zone
    I wanted to make my black snake moan
    Talk a little bit and take that home
    She bad and she know the deal
    That's what I can't hide when she want to conceal
    I mean Megan Good and Halle Berry put together
    Ain't close to the jubee I see
    No no, no disrespect but this gyal a pon another level
    Cut the check, uh
    Tell king, max stop the press, say kid can I get a witness
    
    Girl I can't notice but to, notice you, noticing me
    From across the room I can see it and can't
    Stop myself from looking and noticing you, noticing me
    Watch out I've seen her type before
    That girl is so dangerous
    That girl is so dangerous
    That girl is a bad girl, I've seen her type before
    She's so dangerous
    That girl is so dangerous
    That girl is a bad girl, yeah
    
    I see you got that fire by the way that you walkin'
    From left to right I watched her go down
    Girl I just want it right now don't wanna do no talkin'
    Shortys so right I need to slow down
    
    Figure eight, good body shape
    When she on the dance floor, gyal dem irrate
    When she do her thing man can't walk straight
    That biscuit soak up everything in my plate
    Bad heels like Jessica Pete
    I'm tryna give home girl sex and the city-tity
    Itty bitty waistline moves with the baseline
    One lick of punch, I'm fine
    
    Girl I can't notice but to, notice you, noticing me
    From across the room I can see it and can't
    Stop myself from looking and noticing you, noticing me
    Watch out I've seen her type before
    That girl is so dangerous
    That girl is so dangerous
    That girl is a bad girl, I've seen her type before
    She's so dangerous
    That girl is so dangerous
    That girl is a bad girl, yeah
    '''.lower()
    # sunstr = sunstr.replace(","," ")
    for ch in ",.?:":
        sunstr = sunstr.replace("ch"," ")
    sunstr = sunstr.split()
    
    sunstrset = set(sunstr)
    
    dic = {}
    for i in sunstrset:
        dic[i] = sunstr.count(i)
    
    
    print(dic)
    

      

  • 相关阅读:
    26. 删除排序数组中的重复项
    巧记“指针数组”与“数组指针”
    在 VC 下清空键盘缓冲区的方法
    负数、取模与取余
    任意键开始、暂停
    int 越界处理
    防闪屏批量绘图
    VC 下如何正确的创建及管理项目
    CSDN博客步骤:
    61 扑克牌中的顺子
  • 原文地址:https://www.cnblogs.com/sunyubin/p/9753423.html
Copyright © 2020-2023  润新知