This script works with variables defined in the script.
This script works
--------------------------------------------------------
CriteriaList=[ "probable", "red" ]
MyList=["no help", "help", "not probable", "probable" , "red", "not red", "help me", "something different"]
CleanedList = []
for text in MyList:
if not any(criteria in text for criteria in CriteriaList):
CleanedList.append(text)
print(CleanedList)
output from working script

I wanted to define variables externally in PAD but this script doesn't work.
---------------------------------------------------------------
CleanedList = []
for text in %MyList%:
if not any(criteria in text for criteria in %CriteriaList%):
CleanedList.append(text)
print(CleanedList)
Display Message is shown below. There is no script error

Here is how the external variables are set

