We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
HTML Parser - Part 1
HTML Parser - Part 1
Sort by
recency
|
170 Discussions
|
Please Login in order to post a comment
from html.parser import HTMLParser
class MyHTMLParser(HTMLParser): def handle_starttag(self, tag, attrs): print("Start :", tag) for attr in attrs: print("->", attr[0], ">", attr[1])
parser = MyHTMLParser()
for i in range(int(input())): parser.feed(input())