import string
def LetterCount(str):
str= str.lower().strip()
str = str.strip(string.punctuation)
list1=list(str)
lcDict= {}
for l in list1:
if l.isalpha():
if l in lcDict:
lcDict[l] +=1
else:
lcDict[l]= 1
print lcDict
LetterCount("Abracadabra there it is!")
Stack overflow source