How can i make Python look for a specific word in a string and print it along with a couple of characters before or after it?

前端 未结 0 1201
無奈伤痛
無奈伤痛 2021-01-04 02:20

So let\'s just say i have a string variable called text

text = "Lorem ipsum dolor sit example amet"

How can i make Python look for

相关标签:
回答
  • 消灭零回复
提交回复
热议问题