from bs4 import BeautifulSoup soup = BeautifulSoup(‘

SomebadHTML’) print(soup.prettify())