<s>Human: 在给定的字符串中查找并替换所有匹配某个子字符串的实例。
string = “The quick brown fox jumps over the lazy dog.”  target = “the”  replacement = “a”
</s><s>Assistant: 代码如下：

```python
string = "The quick brown fox jumps over the lazy dog."
target = "the"
replacement = "a"

new_string = string.replace(target, replacement)

print(new_string)
```

输出结果：

```
The quick brown fox jumps over a lazy dog.
```
</s>