for tag in soup.find_all('li'):
print(tag.get_text())
prints
(999.1) Air embolism as
a complication of medical care not elsewhere classified
The get_text
method returns all the text in a tag, even that text which is part of subtags.
Using lxml, you could use
import lxml.html as LH
text = """<li>(<a rel="nofollow" class="external text" href="http://www.icd9data.com/getICD9Code.ashx?
icd9=999.1">999.1</a>) <a href="/wiki/Air_embolism" title="Air embolism">Air embolism</a> as
a complication of medical care not elsewhere classified</li>"""
doc = LH.fromstring(text)
for tag in doc.xpath('//li/a[2]'):
print(tag.tail)
to obtain
as
a complication of medical care not elsewhere classified