universal_list_of_lists_parser#

universal_list_of_lists_parser(input_str)#

Best-effort parser for “list of lists” written in a few loose styles.

This helper is kept for compatibility and is intentionally permissive. It supports inputs like:

"[1 2 3], [4 5 6]"
"(1 2 3) (4 5 6)"
"1 2 3, 4 5 6"
"1 2 3; 4 5 -6"

Items are split by commas/whitespace; integers are converted to int, other tokens are kept as str.

Parameters:

input_str (str) – Source text.

Returns:

A list of lists with parsed items.

Return type:

List[List[str | int]]

Notes

This is not a general parser. Prefer structured formats where possible.