Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def count (n):
- k=0
- def check (i):
- global k
- global sum
- if k == len(n):
- return sum
- if n[i].isdigit() == True:
- k += 1
- sum += 1
- else:
- k += 1
- return check(i+1)
- return (sum)
- print(count('asdasd123123123asad123321'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement