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
🌐
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...
🌐
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....
Discussions

Usage of __all__ in __init__.py
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 JavaScript, for example. And, if yes, if it would be a good thing if an inspection ... More on discuss.python.org
🌐 discuss.python.org
0
August 3, 2022
syntax - What does __all__ mean in Python? - Stack Overflow
I see __all__ in __init__.py files. What does it do? More on stackoverflow.com
🌐 stackoverflow.com
Python all() Function – Easy Explanation with Examples
🌐 r/Python
8
0
January 21, 2026
Computed "__all__" value results in nothing being exported.
There was an error while loading. Please reload this page · Expected Behavior No errors More on github.com
🌐 github.com
5
April 14, 2022
🌐
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-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 ...
🌐
LabEx
labex.io › tutorials › python-how-to-use-all-in-module-definitions-450975
How to use __all__ in module definitions | LabEx
When you define __all__ in a Python module, you explicitly specify which names are publicly accessible when someone performs a wildcard import.
Find elsewhere
🌐
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....
🌐
Reddit
reddit.com › r/python › python all() function – easy explanation with examples
Python all() Function – Easy Explanation with Examples : r/Python
January 21, 2026 - Stay up to date with the latest news, packages, and meta information relating to the Python programming language. --- If you have questions or are new to Python use r/LearnPython ... Sorry, this post was deleted by the person who originally posted it. Share ... all() and any() take all iterables, i.e.
🌐
GitHub
github.com › python › mypy › issues › 12582
Computed "__all__" value results in nothing being exported. · Issue #12582 · python/mypy
April 14, 2022 - Bug Report I have two modules: A.py: __all__ = 'Foo Bar'.split() Foo = 0 Bar = 1 B.py: from A import * Foo To Reproduce mypy . Expected Behavior No errors Actual Behavior B.py:2: error: Name "Foo" is not defined Found 1 error in 1 file (...
Author   mrolle45
🌐
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.
🌐
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.3 documentation
This chapter describes some things you’ve learned about already in more detail, and adds some new things as well. More on Lists: The list data type has some more methods. Here are all of the method...
🌐
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.
🌐
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!
🌐
Python documentation
docs.python.org › 3 › tutorial › modules.html
6. Modules — Python 3.14.3 documentation
The module compileall can create .pyc files for all modules in a directory. There is more detail on this process, including a flow chart of the decisions, in PEP 3147. Python comes with a library of standard modules, described in a separate document, the Python Library Reference (“Library Reference” hereafter).
🌐
Real Python
realpython.com › ref › builtin-functions › all
all() | Python’s Built-in Functions – Real Python
This code reads the CSV file and uses a list comprehension to filter out rows containing any empty fields. The all() function helps streamline the data-cleaning process by efficiently identifying rows with complete data. ... In this step-by-step tutorial, you'll learn how to use Python's all() function to check if all the items in an iterable are truthy.
🌐
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.
🌐
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.
🌐
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.
🌐
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( ...