(Jul-14-2018, 12:42 PM)dj99 Wrote: I am trying to put these 2 lines into a text file
<h2 class="Title">section1</h2>
<p class ="mainparagraph">article1</p>
>>> tags = soup.select('.Title, .mainparagraph') >>> tags [<h2 class="Title">section1</h2>, <p class="mainparagraph">article1</p>] >>> for tag in tags: ... print(tag.text) ... section1 article1Then look how i written to text file in post before.