美文网首页自动化学习-python
2018-10-3:获取字符串中人名

2018-10-3:获取字符串中人名

作者: 种树在此时 | 来源:发表于2018-10-31 00:01 被阅读0次

    def getName(srcStr):
    a=srcStr.split("the name is ")[1].split(",")[0]
    return a

    b='A old lady come in, the name is limaol, level 94454'

    print(getName(b))

    相关文章

      网友评论

        本文标题:2018-10-3:获取字符串中人名

        本文链接:https://www.haomeiwen.com/subject/fuqotqtx.html