def parse_int_list(string):
integers = []<EOL>for comma_part in string.split("<STR_LIT:U+002C>"):<EOL><INDENT>for substring in comma_part.split("<STR_LIT:U+0020>"):<EOL><INDENT>if len(substring) == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>if "<STR_LIT:->" in substring:<EOL><INDENT>left, right = substring.split("<STR_LIT:->")<EOL>left_val = int(left.strip())<EOL>right_val = int(right.strip())<EOL>integers.extend(range(left_val, right_val + <NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>integers.append(int(substring.strip()))<EOL><DEDENT><DEDENT><DEDENT>return integers<EOL>
Parses a string of numbers and ranges into a list of integers. Ranges
are separated by dashes and inclusive of both the start and end number.

Example:
    parse_int_list("8 9 10,11-13") == [8,9,10,11,12,13]