how to split string with separator and output as list