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 = ["hallo", "welt", "tschüss"] print(is_substring("wel", string_list)) # True print(is_substring("hund", string_list)) # False
Result:
Report an issue