What is the most pythonic way of sort a list of tuples like a dominoes game. For example, I have the following list:
un