Is there a Python shortcut for the following? if d.has_key(k): d[k].append(v) else: d[k] = [v] I'm keeping a dictionary of key:list pairs and I'm writing the above often. I think I remember seeing a shortcut to something like this but I can't recall what it was. Thanks, Rob