parse_csv¶
-
privex.helpers.common.
parse_csv
(line: str, csvsplit: str = ',') → List[str][source]¶ Quick n’ dirty parsing of a simple comma separated line, with automatic whitespace stripping of both the
line
itself, and the values within the commas.Example:
>>> parse_csv(' hello , world, test') ['hello', 'world', 'test'] >>> parse_csv(' world ; test ; example', csvsplit=';') ['world', 'test', 'example']