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.
import re;
html = "\n".join([input() for _ in range(int(input()))]);
print(";".join(sorted(set(re.findall(r"<\s?([a-zA-Z]+[0-9A-Za-z])[^>]>", html)))));
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Detect HTML Tags
You are viewing a single comment's thread. Return to all comments →
Python:
import re; html = "\n".join([input() for _ in range(int(input()))]); print(";".join(sorted(set(re.findall(r"<\s?([a-zA-Z]+[0-9A-Za-z])[^>]>", html)))));