判断输入内容有几个整数

content = input("请输入内容:")
count = 0
for i in content:
if i.isdigit(): #判断是不是整数
count = count + 1
print(count)

猜你喜欢

转载自www.cnblogs.com/hadibingjing/p/10934934.html
今日推荐