python - 基础算法题8 - 咱们任意输入一串文字+数字 统计出来数字的个数

s = input("请输入:")  # '1234324324fdsaf1fdsaf12'
count = 0
for i in s:
    if i.isdigit():
        count += 1
print(count)

 

posted @ 2019-07-16 10:22  bigbigbrid  阅读(931)  评论(0编辑  收藏  举报