from itertools import zip_longest

def to_dict(keys, values, default=None):
    return dict(zip_longest(keys, values, fillvalue=default))
What's the Pythonic way to combine two sequences into a dictionary?