import re
str = "hello world"
# 搜索以 "he" 开头,后接任意两个字符,然后以 "o" 结尾的序列:
x = re.findall("he..o", str)
print(x)