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