What is the fastest way to check if a string contains some characters from any items of a list?
Currently, I\'m using this method:
lestring = \"Text1
if the test is to see if there are any characters in common (not words or segments), create a set out of the letters in the list and then check the letters agains the string:
char_list = set(''.join(list_of_words))
test_set = set(string_to_teat)
common_chars = char_list.intersection(test_set)
However I'm assuming you're looking for as little as one character in common...