text = '<br />Red<br />Ao<br />Green<br />yellow<br />'
import requests
from bs4 import BeautifulSoup
soup = BeautifulSoup(text,"html.parser")
soup_text = soup.get_text()
EXECUTION EXAMPLE
In [86]: soup_text
Out[86]: 'Aka Ao Midori Kiiro'
Recommended Posts