Q:

Count number of letters in string (not characters, only letters)

I've tried looking for an answer but I'm only finding how to count the number of characters. I need to know how to count the number of letters within a string. Also need to know how to count the number of numbers in a string. 
For example:
"abc 12"

the output would be

letters: 3 
  numbers: 2 

A:

You have string methods for both cases. You can find out more on string — Common string operations
s = "abc 12"

sum(map(str.isalpha, s))
# 3
sum(map(str.isnumeric, s))
# 2

Or using a generator comprehension with sum:
sum(i.isalpha() for i in s)
# 3
sum(i.isnumeric() for i in s)
# 2

