Personally I really like the new-ish "get" method of dictionaries, which lets you write dict[key] = dict.get(key,[]) + [foo] I don't know about performance implications but it's a nice terse construct.