tree = [ ['a', ['b']], ['b', ['c']], ['c', ['c']] ] def convertTree(myTree): output = [] return output print(convertTree(tree))