---
title: "Remove Breaks in Python"
---

## Aspose.Words - Remove Breaks

**Python Code**

```csharp

## Open the document.

doc = self.Document(self.dataDir + "TestFile.doc")
\# Remove the page and section breaks from the document.
\# In Aspose.Words section breaks are represented as separate Section nodes in the document.
\# To remove these separate sections the sections are combined.
self.removePageBreaks(doc)
self.removeSectionBreaks(doc)
\# Save the document.
doc.save(self.dataDir + "TestFile Out.doc")
```

## Download Running Code

Download **Remove Breaks (Aspose.Words)** from any of the below mentioned social coding sites:

- [GitHub](https://github.com/aspose-words/Aspose.Words-for-Java/blob/master/Plugins/Aspose_Words_Java_for_Python/tests/programmingwithdocuments/workingwithdocument/removebreaks/RemoveBreaks.py)
