cheat_wrapper.py 文件源码

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

项目:cheat.sh 作者: chubin 项目源码 文件源码
def get_unknown(topic):
    topics_list = get_topics_list()
    if topic.startswith(':'):
        topics_list = [x for x in topics_list if x.startswith(':')]
    else:
        topics_list = [x for x in topics_list if not x.startswith(':')]

    possible_topics = process.extract(topic, topics_list, scorer=fuzz.ratio)[:3]
    possible_topics_text = "\n".join([("    * %s %s" % x) for x in possible_topics])
    return """
Unknown topic.
Do you mean one of these topics may be?

%s
    """ % possible_topics_text
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号