def loop_main(temp): str_args = temp.replace("\"","").replace("[[","").replace("]]","").rstrip() flds = str_args.split("],[") ope_t = OperateTreeNode() s = ope_t.createTreeNode(flds[0]) print("s = \n{0}".format(ope_t.treeToStaircaseString(s))) print("s = {0}".format(ope_t.tree2str(s))) t = ope_t.createTreeNode(flds[1]) print("t = \n{0}".format(ope_t.treeToStaircaseString(t))) print("t = {0}".format(ope_t.tree2str(t))) sl = Solution() time0 = time.time() result = sl.isSubtree(s, t) time1 = time.time() print("result = {0}".format(result)) print("Execute time ... : {0:f}[s]\n".format(time1 - time0))