dic.setdefault(key,[]).append(value)
from collections import defaultdict d = defaultdict(list) d['key'].append('mykey')