human
Using a variable in xpath in Python Selenium
assistant
Here is some code to find a tag `option` whose `value` attribute is `state` in selenium

driver.find_element_by_xpath("//option[@value='" + state + "']").click()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.