def keys_and_values(d):
    """Return the keys and values as separate lists.

    Sorted by the key value.
    """
    return [list(keys_values)
            for keys_values
            in list(zip(*sorted(list(d.items()))))]