题解 | #正则查找网址#

正则查找网址

https://www.nowcoder.com/practice/d22cc21332c24d7ea1dae179025b8cf5

import re

def match_url(url):
    match = re.match(r'^https://www', url)
    if match:
        return match.end()
    else:
        return 0

url = input()
result = match_url(url)
print(f"(0, {result})")

全部评论

相关推荐

做个有文化的流氓:Offer收割机
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务