(selection, default, start=0, revert_to_default=True)
return result
Convert a list of numbers into a range of True/False.
    If no input is given, default will be returned,
    otherwise all values not given will be False.
Convert a list of numbers into a range of True/False.
    If no input is given, default will be returned,
    otherwise all values not given will be False.
Convert a list of numbers into a range of True / False . If no input is given default will be returned otherwise all values not given will be False .
def value_select(selection, default, start=0, revert_to_default=True):
    """Convert a list of numbers into a range of True/False.
    If no input is given, default will be returned,
    otherwise all values not given will be False.
    """
    if not selection:
        if revert_to_default:
            return list(default)
        return [False for _ in default]

    if isinstance(selection, str):
        selection = list(map(int, ''.join(i if i in digits else ' ' for i in selection).split()))
    elif isinstance(selection, int):
        selection = [selection]

    result = []
    for i in range(len(default)):
        result.append(i + start in selection)
    return result
def value_select ( selection , default , start = 0 , revert_to_default = True ) : if not selection : if revert_to_default : return list ( default ) return [ False for _ in default ] if isinstance ( selection , str ) : selection = list ( map ( int , '' . join ( i if i in digits else ' ' for i in selection ) . split ( ) ) ) elif isinstance ( selection , int ) : selection = [ selection ] result = [ ] for i in range ( len ( default ) ) : result . append ( i + start in selection ) return result