What does the `i == len(parts)` bit do?