re 正则表达式面试题

1-1. 识别下列字符串:“bat,” “bit,” “but,” “hat,” “hit,” 或 “hut”正则表达式 import  reapi data = 'bat bit btt a ta tib atb but hat hit hut'spa patt = '[bh][aiu]t'.net m = re.findall(patt,data)字符串 print(m)get       1
相关文章
相关标签/搜索