<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def differences(scansion: str, candidate: str) -> List[int]: """ Given two strings, return a list of index positions where the contents differ. :param scansion: :param candidate: :return: [2] """

    before = scansion.replace(" ", "")
    after = candidate.replace(" ", "")
    diffs = []
    for idx, tmp in enumerate(before):
        if before[idx] != after[idx]:
            diffs.append(idx)
    return diffs