Working :
driver.find_element_by_xpath("//span[text()='Feb 08, 2020 - Feb 08, 2021']").click()
Not Working :
driver.find_element_by_xpath("//span[text()=" + TimePeriodNoYear + TodaysYear[:-1] + "0" + " - " + TimePeriod + "]").click()
So, I understand that :
'Feb 08, 2020 - Feb 08, 2021'
is not equal to
Feb 08, 2020 - Feb 08, 2021
But then, How to pass variables inside the string included as argument for xpath ?