You are viewing a single comment's thread. Return to all comments →
re is quite confusing:
import re vowels =r'[aeiouAEIOU]' s =input() l=[*s] c= re.findall(vowels,s) #print(c) t="" flag=0 while len(l)>0 and len(c)>0: character = l.pop(0) #c2=c.pop(0) #print(character==c2) if character == c[0]: t+=c.pop(0) else: if len(t)>1 and not(re.findall(vowels,c[0])==[]) and len(l)>1: print(t) flag=1 t="" else: t="" if len(l)>0 and len(t)>1: print(t) flag=1 if flag==0: print(-1)
Seems like cookies are disabled on this browser, please enable them to open this website
Re.findall() & Re.finditer()
You are viewing a single comment's thread. Return to all comments →
re is quite confusing: