problem
TypeError: ‘WebElement’ object is not iterable error
solve
At first, I thought it was an element problem. Later, I looked at the method carefully because
find should be used_ elements_by_XPath
instead of find_element_by_xpath
for citys in driver.find_elements_by_xpath('/html/body/div[6]/dl'):
instead of
for citys in driver.find_element_by_xpath('/html/body/div[6]/dl'):