<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def path_iter(path):

 """Returns an iterator over all the file & folder names in a path."""

    parts = []
    while path:
        path, item = os.path.split(path)
        if item:
            parts.append(item)
    return reversed(parts)