Your question is Python String Splitting. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Collins Aerospace Pro Line Fusion diagnostic logs may contain repeated multi-character separators. Implement a function that separates a string immediately after the kth occurrence of a specified separator.
The separator itself must not appear in either returned part. Return the text before the kth occurrence and the remaining text after it. Occurrences are counted from left to right, starting at 1. If the separator occurs fewer than occurrence times, return [text, ""].
Implement split_at_occurrence(text, separator, occurrence).
text and separator are strings, and occurrence is a positive integer.[left, right] containing strings.def split_at_occurrence(text, separator, occurrence):