(样卷)统计单词的个数

def word_len(s):
    return len([i for i in s.split(' ') if i])
def main():
    s =  str(input())
    l = word_len(s)
    print("count =",l)
main()

 

posted @ 2020-06-21 16:33  tf383838  阅读(79)  评论(0编辑  收藏  举报