Login and get codingWrite a function that accepts a string and splits the text on the specified separators, but only on the first occurrence of the delimiter.
For example:
>>> split_once('abc: def: ijk, lmno: pqr - stu, wxy', separators=',-:')
['abc', ' def: ijk', ' lmno: pqr ', ' stu, wxy']The separators parameter defaults to
None
if not supplied, in this case you should split on whitespace.
44 out of 53 users completed this Bite.
Will you be the 45th person to crack this Bite?
Resolution time: ~65 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 5.0 on a 1-10 difficulty scale.
» Up for a challenge? 💪