ToolTipHelper.py 文件源码

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

项目:ToolTip-Helper 作者: AvitanI 项目源码 文件源码
def result_format(json, keyorder, link):
        message = ""

        if keyorder:
            try:
                # the output of sorted function is an ordered list of tuples 
                ordered_result = sorted(json.items(), key=lambda i:keyorder.index(i[0]))
            except Exception as e:
                ordered_result = []
            message = Utilities.get_html_from_list(ordered_result)
        else:
            message = Utilities.get_html_from_dictionary(json)
        # add helper link if there is such
        if link:
            message += '<a href=\"%s\">See more</a>' % link
        return message
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号