Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from itertools import islice
def possibilities(hostname):
hostname = hostname.lower().strip('.')
yield hostname
labels = hostname.split('.')
for suffix_i in range(1, len(labels)):
yield '*.' + '.'.join(labels[suffix_i:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.