Hi, it's the first time for me to write codes on leetcode.

The test result is right but the submission result isn't and the problem is Time Limit Exceeded.

Could someone help me with this problem?

Thanks!

```
class Solution(object):
def findAnagrams(self, s, p):
"""
:type s: str
:type p: str
:rtype: List[int]
"""
i=0
result=[]
if len(s)>=len(p):
while(i<(len(s)-len(p)+1)):
flag=0
for ch in range(0,len(p)):
if p[ch] in s[i:i+len(p)]:
flag=1
else:
flag=0
break
if flag==1:
result.append(i)
i+=1
return result
```