def shift_substitution(sub_current: dict, num_places: int) -> dict:
    """
    Edit entries in the substitution dictionary by shifting
    the output characters by num_places through the alphabet
    (wrapping around)
    """

    for cipherchar in sub_current:
        plainchar = sub_current[cipherchar]
        num = ord(plainchar)
        if 97 <= num <= 122:
            num = ((num - 97 + num_places) % 26) + 97
        plainchar = chr(num)
        sub_current[cipherchar] = plainchar

    return sub_current