sorting a list of lists by length and by value,"sorted(a, key=lambda x: (len(x), [confrom[card[0]] for card in x]))"