My issue
while i < (len(u)-1):
i = i + 1
if u[i] == ‘t’ and u[i+1] == ‘h’:
print(‘Yes’)
if i == (len(u) - 1):
print(‘no’)
break
Learning course: Strings using Python
Problem Link: Rearrange Code Practice Problem in - CodeChef
while i < (len(u)-1):
i = i + 1
if u[i] == ‘t’ and u[i+1] == ‘h’:
print(‘Yes’)
if i == (len(u) - 1):
print(‘no’)
break
Learning course: Strings using Python
Problem Link: Rearrange Code Practice Problem in - CodeChef
@golden_girl
this will be the correctly rearranged code
while i < (len(u)-1):
if u[i] == 't' and u[i+1] == 'h':
print('Yes')
break
i = i + 1
if i == (len(u) - 1):
print('no')