I'm fairly new to python. I spent days on the forum and the answers to my question exist but for javascript.
I have an html page with the news and I want the content to be parsed into a new section anytime there is an H4 tag. I want to name the section based on the content of the string and then later call the sections into separate emails (but that's for later). I can't seem to figure out how to create these sections. Below is what the code looks like. Any advice is very much appreciated sorry if my question is rudimentary. Thank you!
'<td><h3>Andean</h3><hr/></td>
</tr><tr>
<td><h4>Bolivia bla bla</h4></td>
</tr>
<tr>
<td><p>* Bolivia&bla bla text text </p></td>
</tr><tr>
<td><h3>Brazil</h3><hr/></td>
</tr><tr>
<td><h4>BRAZIL: bla bla</h4></td>
</tr>
<tr>'