摘要: 今天突然想用到这个功能 结果百度到的 基本是写乱糟糟的一堆代码 无奈只好亲自操刀 话不多说,先上代码: class Tools: @staticmethod def list_to_tree(data, pid=0): children = [item for item in data if ite 阅读全文
posted @ 2024-07-10 21:03 rianley 阅读(5) 评论(0) 推荐(0) 编辑