By using such a code
str(soup.find('body'))
BeautifulSoup returns all the contents of body including and tags. Because I aggregate these tags into a new one, multiple tags appear in the new html document. This might cause some CSS problems in the presentation of the document, I propose. Thats why I needed to eliminate those superfluous tags.
This page from stackoverlow has helped me.
The required code was like that
body=body+''.join(map(str,soup.find('body').contents))
I really like BeautifulSoup as I like sed.