On 19/12/12 5:12 PM, Mitya Sirenef wrote: > You can also do: > > count = sum(i==digit for i in number) > > I think this is very clear and short.. Another... import re count = len(re.findall(digit, number)) -- shantanoo