>>47
誤 i : i
正 i : i + len(pattern)

文字列のi番目 から i + len(pattern)番目(の直前)までを部分文字列として取り出す