Source Code:
(back to article)
def is_substring(string, string_list): return any(string in s for s in string_list) string_list = ["hello", "world", "goodbye"] print(is_substring("wor", string_list)) # True print(is_substring("dog", string_list)) # False
Result:
Report an issue