Keith Dart wrote: > try: > dict[a].append(b) > except KeyError: > dict[a] = [b] or my favorite Python shortcut: dict.setdefault(a, []).append(b) Kent