Use re.search() to search for the first occurrence of the word "coconuts" in scene_one. Store the result in match. Print

动态 未结 0 124
小小草
小小草 LV1 2023年9月23日 23:40 发表
Here's the completed code: ``` # Search for the first occurrence of "coconuts" in scene_one: match match = re.search("coconuts", scene_one) # Print the start and end indexes of match print(match.start(), match.end()) ``` The code uses `re.search()` to search for the first occurrence of the word "coconuts" in a string. It then prints the start and end indexes of
收藏(0)  分享
相关标签: 智能问答
问题没解决?让AI助手帮你作答 AI助手
0个回复
  • 消灭零回复