Skip to content

Instantly share code, notes, and snippets.

class Solution(object):
def strStr(self, source, target):
if source == None or target == None:
return -1
len_t = len(target)
if len_t == 0:
return 0
pos_s = 0
for char_s in source[:-len_t]:
pos_t = 0