graph_renderer.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Lyra 作者: caterinaurban 项目源码 文件源码
def _list2table(lst, escape=True):
        """Turn a list into an HTML table (to be used as a DOT label)."""
        table = '<<table border="0" cellborder="0">{}</table>>'     # table HTML format
        row = '<tr><td align="center">{}</td></tr>'                 # row HTML format
        escape_function = html.escape if escape else lambda x: x
        return table.format("\n".join(map(row.format, map(lambda x: escape_function(str(x)), lst or [""]))))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号