Bob> I have a list of lists of lists. How can I turn that into a tuple of Bob> tuples of tuples? def alltuples(x): if isinstance(x, list): x = tuple(map(alltuples, x)) return x