Find element with certain text using Selenium with Python
If you want to improve the code readability, you should see to follow a page object pattern.
A first step would be to define the locator in a variable with an explicit name:
from selenium.webdriver.common.by import By
item_wine_pinot_noir = (By.XPATH, "//a/h4[text()='%s']" % "Pinneau noir")browser.find_element(*item_wine_pinot_noir).click()