#!/usr/bin/env python3 from urllib.request import urlopen tlds = urlopen('https://data.iana.org/TLD/tlds-alpha-by-domain.txt').read().decode('utf8') tlds += "\n" + urlopen('https://cdn.froth.zone/opennic-alpha-by-domain.txt').read().decode('utf8') for line in tlds.splitlines(): print(line.lower())