import restr_1= 'hoooowe'pattern = re.compile(r'([aeiouy])\1{2}')print([x.group() for x in pattern.finditer(str_1)])
Standard input is empty
['ooo']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!