I want to know if the text contain any text of the list.
I wrote the code below.
But it needs for-loop, I think it is possible to be more quickly.
Pleas tell me faster code?
subject_type_list = ['dog','cat','sheep','turtle']
searched_text = 'wertyuisdfghdog;;rtyuiobnmcatuio'
def confirm_existence():
for search_word in subject_type_list:
if search_word in searched_text:
return True
return False
confirm_existence()