I have an string (items with comma separated) and I need to check if any of the items in the string (or list after split) are present in a long string.
I know how to do
Use any checking if any word is in test :
if any(word in test for word in people.split(",")): # do whatever
Your logic is incorrect as you are checking test is in the split list of words which does not match your first loop.