My issue
the code give in solution i didn’t understand why did he use return inside for loop
My code
# cook your dish here
def vow(x):
return x=='a' or x=='e' or x=='i' or x=='o' or x=='u'
def sol():
for i in range(0,n-2):
if vow(s[i]) and vow(s[i+1]) and vow(s[i+2]):
print("Happy")
return
print("Sad")
t=int(input())
while t>0:
s=input()
n=len(s)
t-=1
sol()
Learning course: Strings using Python
Problem Link: Chef and Happy String Practice Problem in - CodeChef