In brief
Empty parts can also be significant results.
Useful to know
split() divides a string by a specified separator and returns an array. In "a,b ".split(",") the result is [" a", "", "b "]. Empty field is not automatically removed . [1]
If the input is a list of labels, decide whether empty entries are allowed and whether each item should be cleared of surrounding spaces. These are separate steps. Do not use split(",") for any CSV file: quotation marks and commas inside values require a parser for the form, not just a division by a single character.
Sources
For further detail and to check the information: