def convert_range_to_list(x):
    """
    Returns list of numbers from given range as string

    e.g.: convert_range_to_list('3-5') will give [3, 4, 5]
    """
    # pylint: disable=C0103
    result = []
    for part in x.split(','):
        if '-' in part:
            a, b = part.split('-')
            a, b = int(a), int(b)
            result.extend(range(a, b + 1))
        elif part != '':
            a = int(part)
            result.append(a)
    # remove duplicates
    result = list(dict.fromkeys(result))
    return result