#导入文本 dream=’’‘I have a dream’’’ #全部大写 text=dream.upper() #统计字母个数 for alphabet in ‘’‘ABCDEFGHIJKLMNOPQ RSTUVWXYZ’’’ number=text.count(alphabet) print(alphabet,number)
标题Python#导入文本dream=’’‘I have a dream’’’#全部大写text=dream.upper()#统计字母个数for alphabet in ‘’‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’’’number=text.count(alphabet)print(alphabet,number)