(motions)
Yield each motion in the form "motion <padding> help"

    e.g. ['5j   Down 5 lines', '$    To the end of the line']
Yield each motion in the form "motion <padding> help"
Yield each motion in the form motion <padding > help
def explained_motions(motions):
    """
    Yield each motion in the form "motion <padding> help"

    e.g. ['5j   Down 5 lines', '$    To the end of the line']
    """
    for motion, group in itertools.groupby(motions):
        repetitions = len(list(group))
        yield (
            get_count(motion, repetitions) + "  " + get_description(motion, repetitions)
        )
def explained_motions ( motions ) : for motion , group in itertools . groupby ( motions ) : repetitions = len ( list ( group ) ) yield ( get_count ( motion , repetitions ) + "  " + get_description ( motion , repetitions ) )