Even without the marker, can't you do: sentence = "the fabric is red" colors = ["red", "white", "blue"]
for color in colors: if (sentence.find(color) > 0): print color, sentence.find(color) -- http://mail.python.org/mailman/listinfo/python-list
Even without the marker, can't you do: sentence = "the fabric is red" colors = ["red", "white", "blue"]
for color in colors: if (sentence.find(color) > 0): print color, sentence.find(color) -- http://mail.python.org/mailman/listinfo/python-list