Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = input("Input: ")
- chars = 0
- nums = 0
- for i in string:
- if i.isdigit():
- nums = nums + 1
- elif i.isalpha():
- chars = chars + 1
- print(chars)
- print(nums)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement