count the same letters in a single word python code example
Example 1: pyton count number of character in a word
# Count number of characters in a string (word)
a = "some string"
print len(a) # 11
Example 2: python count character occurrences
str1.count("a")