我应该在字符串中找到一个‘Finding a 'hello' word in a different string, which it has 'hello' in it’单词,它是我从input too中给出的,.I写了这段代码,它是通过查看某人对下面链接问题的答案来编写的。hello = "hello"
counter_hello =
有什么方法可以在Python 3+中实现这一点吗?
我有一个字符串He said: <p>He<i>ll</i>o how are you?,它包括那些纯文本标记。方法find()返回一个索引(一个位置)与搜索的字符串。在find()的regex版本中,我是否可以输入这个<[^<]+?>作为正则表达式,以查找包含在<>中<e