Why I got WA in "Chef and his sequence"?

This is a question where I have to say if a string x is a substring of a string y. I thought “find” would be amazing for this, but for some reason I got a WA.
This is the code:

cook your dish here

t = int(input())
for _ in range(t):
l1 = input()
s1 = input()
l2 = input()
s2 = input()

if s2 in s1:
    print('Yes')
else:
    print('No')

l1 and l2 are just the length of the strings.

I know you could iterate over the strings, but I think using find is easier, and I cant find a testcase where my code fails. My theory is that the problem meant to say “subsequence”, instead of substring. I’ll try that now.

Thanks in advance

That’s precisely what it is - it’s a very sloppily written question.

1 Like

I see. Thanks!

1 Like