<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stress_positions(stress: str, scansion: str) -> List[int]: """ Given a stress value and a scansion line, return the index positions of the stresses. :param stress: :param scansion: :return: [0, 3, 6] """

    line = scansion.replace(" ", "")
    stresses = []
    for idx, char in enumerate(line):
        if char == stress:
            stresses.append(idx)
    return stresses