使用 findall()函数使用 findall()函数import re #Return a list containing every occurrence of "ai": str = "China is a great country"x = re.findall("a", str)print(x)