如何在不使用复杂正则表达式的情况下搜索空格分隔的字符串。这是我的代码
import re
stringToQueryLevel1 = ['why this','why this code','why this code is complex']
for i in range(stringToQueryLevel1.__len__()):
if re.search('why this' , stringToQueryLevel1[i]) != None:
rc = 0
else:
rc = 1
print rc