how to split string into list conditionally 2bpython

Solutions on MaxInterview for how to split string into list conditionally 2bpython by the best coders in the world