Как удалять строки, к примеру нужно удалить все строки где group='setting'?
db.session.query(Setting).filter_by(group='setting').delete()
In [1]: for counter in range(1, 11):
...: print(".//*[@id='b_results']/li[{}]/div[2]/div/cite".format(counter))
...:
.//*[@id='b_results']/li[1]/div[2]/div/cite
.//*[@id='b_results']/li[2]/div[2]/div/cite
.//*[@id='b_results']/li[3]/div[2]/div/cite
.//*[@id='b_results']/li[4]/div[2]/div/cite
.//*[@id='b_results']/li[5]/div[2]/div/cite
.//*[@id='b_results']/li[6]/div[2]/div/cite
.//*[@id='b_results']/li[7]/div[2]/div/cite
.//*[@id='b_results']/li[8]/div[2]/div/cite
.//*[@id='b_results']/li[9]/div[2]/div/cite
.//*[@id='b_results']/li[10]/div[2]/div/cite
>>> import lxml.html
>>> html = lxml.html.fromstring('''\
... <html><body onload="" color="white">
... <p>Hi !</p>
... </body></html>
... ''')
>>> print lxml.html.tostring(html)
<html><body onload="" color="white"><p>Hi !</p></body></html>
>>> print lxml.html.tostring(html)
<html> <body color="white" onload=""> <p>Hi !</p> </body> </html>
>>> print lxml.html.tostring(html)
<html>
<body color="white" onload="">
<p>Hi !</p>
</body>
</html>