littlebuddys = ['jack','terry','john','rooney','ross','kzc','john','ross','ross']
d = {} for buddy in littlebuddys: if buddy not in d: d[buddy] = 0 d[buddy] += 1
d = {} for buddy in littlebuddys: try: d[buddy] += 1 except KeyError: d[buddy] = 1
d = {} for buddy in littlebuddys: d[buddy] = d.get(buddy,0) + 1
d = dict.fromkeys(littlebuddys,0) for buddy in littlebuddys: d[buddy] += 1
from collections import defaultdict d = defaultdict(int) for buddy in littlebuddys: d[buddy] += 1
from collections import Counter d = Counter(littlebuddys)