Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. string = input("Input: ")
  2.  
  3. chars = 0
  4. nums = 0
  5. for i in string:
  6.     if i.isdigit():
  7.         nums = nums + 1
  8.     elif i.isalpha():
  9.         chars = chars + 1
  10. print(chars)
  11. print(nums)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement