Python(38)_统计输入的字符串有多少数字

#-*-coding:utf-8-*-
'''
有多少个数(连续),输入字符串(只有字母和数字)
'''
info = input(">>>")
for i in  info:
    # 判断是不是字母
    if i.isalpha():
        info = info.replace(i,' ')
l = info.split()
print(l)
print(len(l))
#-*-coding:utf-8-*-
'''
有多少个数(连续),输入字符串(只有字母和数字)
'''
s = 'bowen#815#bowen2'
# 以什么划分,什么就没了
s1 = s.split('#')
print(s1)

原文地址:https://www.cnblogs.com/sunnybowen/p/10208932.html