chunks and a separator character sep. Cut every string at each occurrence of sep (the separator itself goes into no piece) and throw away empty pieces.
Return all the non-empty pieces as one list: first the pieces of the first string from left to right, then those of the second, and so on.chunks=['red,green', 'blue', ',,white,'], sep=',' → ['red', 'green', 'blue', 'white']
"red,green" gives "red" and "green", "blue" stays as it is, and ",,white," leaves only "white" once the empty pieces are dropped.
chunks=['##', '#'], sep='#' → []
Every piece is empty, so the answer is an empty list.
chunks=['a.b', 'c|d'], sep='|' → ['a.b', 'c', 'd']
.,|$#@-.,|$#@-chunks=['red,green', 'blue', ',,white,'], sep=','
['red', 'green', 'blue', 'white']
Run checks the first 3 tests in your browser. Submit checks all 108 tests on the server, hidden ones included.