# Import Module from bs4 import BeautifulSoup # HTML Document HTML_DOC = """ Geeksforgeeks is a
Computer Science portal.
""" # Function to remove tags def remove_tags(html): # parse html content soup = BeautifulSoup(html, "html.parser") for data in soup(['style', 'script']): # Remove tags data.decompose() # return data by retrieving the tag content return ' '.join(soup.stripped_strings) # Print the extracted data print(remove_tags(HTML_DOC))