try:
    yazdir = driver.find_element(By.XPATH, ("1. XPATH KODU"))
except:
    yazdir = driver.find_element(By.XPATH, ("2. XPATH KODU"))