I was doing this promblem on leetcode https://leetcode.com/problems/implement-strstr/ when I wrote the code
if not needle: return 0 for x in rang