主页
Python
Python 正则表达式
demo_regex_findall
运行 ❯
×
更改方向
保存代码
更改主题
import re #Return a list containing every occurrence of "ai": txt = "The rain in Spain" x = re.findall("ai", txt) print(x)
['ai', 'ai']