def get_free_symbols(func, symbs_to_ignore=None):
    """
    Returns all free elements of a function, by ignoring symbs_to_ignore
    :param func: function to check
    :param symbs_to_ignore: values to ignore in result
    :return: list of all free symbols
    """
    if isinstance(func, int) or isinstance(func, float):
        return [func]
    if not isinstance(symbs_to_ignore, list):
        symbs_to_ignore = [symbs_to_ignore]
    free_symbs = []
    all_free_symbs = func.free_symbols
    for el in all_free_symbs:
        if el not in symbs_to_ignore:
            free_symbs.append(el)
    return free_symbs