标签:spl for 统计 you color lower 三次 int bsp
str=‘‘‘Baby, baby, baby nooo My baby, baby, baby noo My baby, baby, baby nooo I thought youd always be mine mine Baby, baby, baby nooo My baby, baby, baby noo My baby, baby, baby nooo‘‘‘ print(str); print(str.lower()); print(str.split()) print("统计每个单词出现的次数为:") strSet=set(str.split()) for word in strSet: print(word,str.split().count(word))
标签:spl for 统计 you color lower 三次 int bsp
原文地址:https://www.cnblogs.com/dalin-lyl/p/9691405.html