题解 | #牛群的信息传递#
牛群的信息传递
https://www.nowcoder.com/practice/0130cb88968a441b9eedbc103466d2bf
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param message string字符串 # @param keyword string字符串 # @return int整型 # import re class Solution: def findKeyword(self , message: str, keyword: str) -> int: # write code here match = re.search(keyword, message) if match: return match.start() else: return -1