Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-liner: itertools.permutations solution in Creative category for The End of Other by Stensen
from itertools import permutations
checkio = lambda ws_set: len(ws_set) > 1 and any([i[-len(j):] == j for i, j in permutations(ws_set, 2)])
Oct. 5, 2020