I\'m new to python and I was wondering how string comparison is done
Let\'s say I have a list of strings containing state names like
states = [\"New York
>>> states = ["New York", "California", "Nebraska", "Idaho"]
>>> postal_addr = "1234 1st E St San Jose California 95112"
>>> first_match = next(state for state in states if state in postal_addr)
>>> first_match
'California'
However, if you need to match at word boundaries, you might be better off using a regex.