在给定的字符串中查找并替换所有匹配某个子字符串的实例。


string = “The quick brown fox jumps over the lazy dog.”  target = “the”  replacement = “a”
使用Python中的replace()函数，可以轻松找到并替换所有匹配子字符串的实例，例如：

```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."