I'm pretty new to the coding world, so maybe someone can help me. Might even be a straight forward problem. Currently I'm using selenium and python for a project, but I can't find anything helpful so far. Would it be possible to define the variables in a f-string as a range of numbers which are inserted in the placeholder one by one so selenium can check each f string seperately? Thats what I got so far. The range of "Wunschliste" is supposed to be between 8-18 for each of the values of "terital". First 4 then 7 and so on.
while not BuBu:
try:
Wunschliste = range(8-18)
tertial = '4,7,10'
Wunsch1 = Wu1 = browser.find_element_by_xpath(f"/html/body/div[7]/div[2]/div/table/tbody/tr{Wunschliste}]/td[{tertial}]/img")
Wu1.click()
print("Wunsch1 eingeloggt")
browser.find_element_by_class_name("pj_nicht_buchbar")
print("nope")
time.sleep(3)
except: ...
Thanks! Hope it makes sense