Hackerrank HTML Parser - Part 2 Solution
*This section assumes that you understand the basics discussed in HTML Parser - Part 1
.handle_comment(data)
This method is called when a comment is encountered (e.g. ).
The data argument is the content inside the comment tag:
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def handle_comment(self,