from bs4 import BeautifulSoup html_doc = "In this example, the `decompose()` method is used to remove the `p` tag from the HTML document. The modified document is then printed to the console. Package/Library: The package/library being used here is `beautifulsoup4`. It can be installed using pip: `pip install beautifulsoup4`.Hello, world!
" soup = BeautifulSoup(html_doc, 'html.parser') # Find the 'p' tag p_tag = soup.find('p') # Remove the 'p' tag p_tag.decompose() # Print the modified soup print(soup)