python统计数字个数_python统计字母、空格、数字等字符个数的实例
如下所示:# -*- coding: utf-8 -*-# 要求:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。def count(s):count_a=count_z=count_o=count_s=0for i in s:if (ord(i)>=97 and ord(i)=65 and ord(i)=48 and ord(i)...