我有一份亚马逊设施清单:
.gitignore
说我有一个字符串:
locs = [LGB6, OAK5]
这是我尝试过的事情:
amz_string = 'LGB6 is in Riverside, CA'
我的输出变为r = re.compile(amz_string)
filter(r.search. locs)
答案 0 :(得分:1)
您可以使用unsigned long long
:
str.join
输出:
import re
locs = ['LGB6', 'OAK5']
amz_string = 'LGB6 is in Riverside, CA'
new_results = re.findall('|'.join(locs), amz_string)