parse_spaced_rows#
- parse_spaced_rows(data_str)#
Parses a string into a list of integers or a list of lists of integers. Supports comma (,) or semicolon (;) as row separators. Trims whitespace and normalizes spacing.
- Examples:
“1 2 3” -> [1, 2, 3] “1 2 3, 4 5 -6” -> [[1, 2, 3], [4, 5, -6]] “1 2 3 ; 4 5 -6” -> [[1, 2, 3], [4, 5, -6]]