In selenium when I search for an id or an id in an xpath, I am instantly met with a syntax error. For example, if I run
driver.find_element_by_xpath("//*[@id="select-dance"]/option[2]").click()
I immediately get an error
driver.find_element_by_xpath("//*[@id="select-dance"]/option[2]").click() ^ SyntaxError: invalid syntax
I tried saving "select-dance" to a variable and then putting that variable in, but that does not help either.
'//*[@id="select-dance"]/option[2]'