Это мой полный текст:
RETENTION
Liability in excess of the Retention
The Retention shall be borne by the Named Insured and the Insurer shall only be liable for Loss once the Retention has been fully eroded. The Retention shall apply until such time as it has been fully eroded after which no Retention shall apply.
Erosion of the Retention
The Retention shall be eroded by Loss for which the Insurer would be liable under this Policy but for the Retention.
Я хочу извлечь весь абзац RETENTION.
Это был мой код для извлечения предложений, содержащих определенное слово (здесь: удержание).
abc3=([sentence + '.' for sentence in txt_trim_string.split('.') if 'RETENTION' in sentence])
Но это дало вывод как:
RETENTION
Liability in excess of the Retention
The Retention shall be borne by the Named Insured and the Insurer shall only be liable for Loss once the Retention has been fully eroded.
Я также хочу включить:
Erosion of the Retention
The Retention shall be eroded by Loss for which the Insurer would be liable under this Policy but for the Retention.
Как я могу это сделать