原题题目

代码实现
string = input();count1 = count2 = count3 = 0
for i in string:
if str.isupper(i) :count1+=1
elif str.islower(i): count2+=1
elif str.isdigit(i): count3+=1
print("{}n{}n{}".format(count1,count2,count3))
最后
以上就是笑点低鸭子最近收集整理的关于Python课后作业 3. 统计大小写字母个数和数字个数(第二次作业)的全部内容,更多相关Python课后作业内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复