I am trying to fumble through python, and learn the best way to do things. I have a string where I am doing a compare with another string to see if there is a match:
I assume you mean list and not array? There is such a thing as an array in Python, but more often than not you want a list instead of an array.
list
array
The way to check if a list contains a value is to use in:
in
if paid[j] in d: # ...