If the goal is:

Check that all elements of a list are not present in a string.

The pattern should be: all(s not in my_string for s in input_list)

l = ["abc","ghi"]
s1 = "xyzjkl"
s2 = "abcdef"

print(all(s not in s1 for s in l))  # True
print(all(s not in s2 for s in l))  # False
Answer from Alexander L. Hayes on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_func_all.asp
Python all() Function
Python Examples Python Compiler ... Certificate Python Training ... The all() function returns True if all items in an iterable are true, otherwise it returns False....
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ library โ€บ functions.html
Built-in Functions โ€” Python 3.14.3 documentation
2 weeks ago - The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order.,,,, Built-in Functions,,, A, abs(), aiter(), all(), a...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-all-function
Python - all() function - GeeksforGeeks
July 23, 2025 - The Python all() function returns true if all the elements of a given iterable (List, Dictionary, Tuple, set, etc.) are True otherwise it returns False. It also returns True if the iterable object is empty.
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ methods โ€บ built-in โ€บ all
Python all()
Become a certified Python programmer. Try Programiz PRO! ... The all() function returns True if all elements in the given iterable are truthy.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-__all__
Python __all__ - GeeksforGeeks
July 23, 2025 - In this scenario, every variable ... Python mechanism, called __all__, which allows users to import only some variables rather than the entire set of variables from a Python file....
Find elsewhere
๐ŸŒ
Real Python
realpython.com โ€บ python-all-attribute
Python's __all__: Packages, Modules, and Wildcard Imports โ€“ Real Python
March 4, 2024 - The __all__ variable is a list of strings where each string represents the name of a variable, function, class, or module that you want to expose to wildcard imports. ... To get the most out of this tutorial, you should be familiar with a few ...
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
Usage of __all__ in __init__.py - Python Help - Discussions on Python.org
August 3, 2022 - Hello, I notice that some projects make use of the __all__ member in the __init__.py file to declare members that are part of the public API of a package. I am wondering if this can be compared to module exports in Javโ€ฆ
๐ŸŒ
Real Python
realpython.com โ€บ python-all
Python's all(): Check Your Iterables for Truthiness โ€“ Real Python
June 16, 2023 - This function takes an iterable and checks all its items for truth value, which is handy for finding out if those items have a given property or meet a particular condition. Pythonโ€™s all() is a powerful tool that can help you write clean, readable, and efficient code in Python.
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ any-and-all
Python's any() and all() functions - Python Morsels
March 29, 2023 - Need to check whether all items in a list match a certain condition? You can use Python's built-in any and all functions for that!
๐ŸŒ
Medium
medium.com โ€บ @akshatgadodia โ€บ demystifying-all-in-python-a-closer-look-at-module-exports-f4d818a12bb6
Demystifying __all__ in Python: A Closer Look at Module Exports | by Akshat Gadodia | Medium
February 26, 2024 - This communicates to users that these are the functions intended for external use. In Python, __all__ is a valuable tool for controlling the visibility of names in a module's public API.
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
How to Use all() and any() in Python | note.nkmk.me
May 12, 2025 - In Python, you can use the built-in functions all() and any() to check whether all elements or at least one element in an iterable (such as a list or tuple) evaluate to True. Built-in Functions - all( ...
๐ŸŒ
Bacancy Technology
bacancytechnology.com โ€บ qanda โ€บ python โ€บ what-dose-all-mean-in-python
What does __all__ mean in Python?
November 18, 2024 - You can treat __all__ is a special variable that can be used to control what names are imported In case of from package import *. By default, the * operator will import all names from the module that is a public variable.
๐ŸŒ
Gauge
gauge.sh โ€บ blog โ€บ the-trouble-with-all
The trouble with __all__ - Gauge - Solving the monolith/microservices dilemma
With Tach, you can declare each module, and define a strict interface through __all__. It has no runtime impact as itโ€™s enforced through static analysis. You also get more fine-grained control of which modules can see each other. Letโ€™s take a look at doing that with our little sample codebase! In this case, weโ€™ll move from the Python shell to main.py to run our imports.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-any-and-all-functions-explained-with-examples
Python any() and all() Functions โ€“ Explained with Examples
August 10, 2021 - When coding in Python, have you ever had to check if any item or all items in an iterable evaluate to True? The next time you need to do so, be sure to use the nifty functions any() and all(). In this tutorial, we'll learn about Python's any() and al...
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ python-how-to-use-all-in-python-modules-437148
How to use __all__ in Python modules | LabEx
When you define __all__ in a Python module, you create a list of strings that represent the names of symbols that should be considered public and importable.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ python_all_function.htm
Python all() Function
The Python all() function is a built-in function that returns True if all the elements of a given iterable, such as a list, tuple, set, or dictionary are truthy, and if any of the values is falsy, it returns False.
๐ŸŒ
Reddit
reddit.com โ€บ r/programming โ€บ the trouble with __all__
r/programming on Reddit: The trouble with __all__
August 1, 2024 - Yea I mean itโ€™s Python, a language with many flaws such as no private scope, global namespace pollution, and a convention typically followed but impossible to enforce where underscores mean a private something ... I donโ€™t really see it as all that different from using reflection in Java to call private methods.
๐ŸŒ
Vultr Docs
docs.vultr.com โ€บ python โ€บ built-in โ€บ all
Python all() - Test If All True | Vultr Docs
September 27, 2024 - The all() function in Python is critical for determining whether every element within an iterable (like lists, tuples, or dictionaries) meets a condition, specifically that all elements are True.