def list_duration_range(duration_str: str) -> list:
    """
    将字符串的上课时间信息解析为列表
    >>> list_duration_range('1-2')
    [1, 2]
    >>> list_duration_range('10-17')
    [10, 11, 12, 13, 14, 15, 16, 17]
    >>> list_duration_range('9')
    [9]
    >>> list_duration_range('10-12(双)')
    [10, 12]
    >>> list_duration_range('1-3,7-9')
    [1, 2, 3, 7, 8, 9]
    >>> list_duration_range('10-12(双),13-17')
    [10, 12, 13, 14, 15, 16, 17]
    """
    rlist = []
    # 首先按照逗号分割多个情况
    if ',' in duration_str:
        durations = duration_str.split(',')
    else:
        durations = [duration_str]
    for item in durations:
        if '-' not in item:
            rlist.append(int(item))
            continue
        # 判断是否为单双周的课程
        if '(单)' in item:
            item = item[:-3]
            l, r = [int(x) for x in item.split('-')]
            if l % 2 == 0:
                l += 1
            rlist += list(range(int(l), int(r) + 1, 2))
        elif '(双)' in item:
            item = item[:-3]
            l, r = [int(x) for x in item.split('-')]
            if l % 2 != 0:
                l += 1
            rlist += list(range(int(l), int(r) + 1, 2))
        else:
            l, r = [int(x) for x in item.split('-')]
            rlist += list(range(int(l), int(r) + 1))
    return sorted(rlist)