I have a set of paths I'd like to check before append it to a list. Is there a functional way to write this such that the conditional statement is less redundant?
if not path.endswith(".json") or not path.endswith(".toc") or not path.endswith("_index") or not path.endswith(...) or ...:
some_list.append(path)