代码示例:(标识:python_regex_findall_1)
python_regex_findall_1.py
import re

#Return a list containing every occurrence of "ai":

str = "China is a great country"
x = re.findall("a", str)
print(x)
运行结果: