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.
print(';'.join(sorted(set([i.group(2) for i in re.finditer(r'https?://(www2?.)?(([A-Za-z0-9-]+.)+[A-Za-z0-9]+)', '\n'.join(input() for _ in range(int(input()))))]))))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Detect the Domain Name
You are viewing a single comment's thread. Return to all comments →
import re
print(';'.join(sorted(set([i.group(2) for i in re.finditer(r'https?://(www2?.)?(([A-Za-z0-9-]+.)+[A-Za-z0-9]+)', '\n'.join(input() for _ in range(int(input()))))]))))