states = ["New York", "California", "Nebraska", "Idaho"]
postal_addr = "1234 1st E St San Jose California 95112"
result = None
for state in states:
if state in postal_addr:
result = state
print(result)
Unfortunately, this will also match words that contain a state name such as Idahoba.