def Count_str(s):
if len(s) ==0 :
return 0,0,0,0
upper_num,lower_num, number_num,other_num = 0,0,0,0
for i in s:
if i.isupper():
upper_num += 1
elif i.islower():
lower_num += 1
elif i.isdigit():
number_num += 1
else:
other_num += 1
return upper_num,lower_num,number_num,other_num
s = input("请输入你想要输入得字符串:")
n1,n2,n3,n4 = Count_str(s)
print(f"大写字母有{n1}个,小写字母有{n2}个,数字有{n3}个,其他字符有{n4}个")```