【发布时间】:2018-09-14 10:07:46
【问题描述】:
a = "This is some text"
b = "This text"
我想比较a中的变量b,即使文本包含两个以上的单词,也应该返回true
a = "This is another text here"
b = "This another here"
即使我在 a 中比较 b 应该在 python 中返回 true
条件:True == 找到b 中的所有单词,顺序相同,位于a。
在上面的例子中,单词必须是相同的顺序和大写/小写。
【问题讨论】:
-
它们的字母或字数是否大于 2?
-
我想像这样搜索 - Python 中的 This%text