• + 0 comments
    from html.parser import HTMLParser
    
    class MyHTMLParser(HTMLParser):
        def handle_starttag(self, tag, attrs):
            print ("Start :", tag)
            if attrs:
                for attr, value in attrs:
                    print(f"-> {attr} > {value}")
            
        def handle_endtag(self, tag):
            print ("End   :", tag)
        def handle_startendtag(self, tag, attrs):
            print(f"Empty : {tag}")
            if attrs:
                for attr, value in attrs:
                    print(f"-> {attr} > {value}")
            
    
    parser = MyHTMLParser()
    
    for i in range(int(input())):
        parser.feed(input())