<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dotted_parts(s):
 """ For a string "a.b.c", yields "a", "a.b", "a.b.c". """

    idx = -1
    while s:
        idx = s.find('.', idx+1)
        if idx == -1:
            yield s
            break
        yield s[:idx]