A Word document can be very plain, but we can also add styling to help properly understand the displayed data. Word has a set of predefined styles that can be used to variate the document and highlight the important parts of it.
Styling a Word document
Getting ready
We'll use the python-docx module to process Word documents:
>>> echo "python-docx==0.8.6" >> requirements.txt
>>> pip install -r requirements.txt
How to do it...
- Import the python-docx module:
>>> import docx
- Create a new document:
>>> document = docx...