old_contents: # This program uses the python-docx module to manipulate Word documents
  
  import docx
  doc = docx.Document("demo.docx")
  print(len(doc.paragraphs))
  print(doc.paragraphs[0].text)
  print(doc.paragraphs[1].text)
  
  print(len(doc.paragraphs[1].runs))
  print(doc.paragraphs[1].runs[0].text)
  print(doc.paragraphs[1].runs[1].text)
  print(doc.paragraphs[1].runs[2].text)
  print(doc.paragraphs[1].runs[3].text)
  print(doc.paragraphs[1].runs[4].text)
  
new_contents: # This program uses the python-docx module to manipulate Word documents
  
  import docx
  doc = docx.Document("demo.docx")
  print(len(doc.paragraphs))
  print(doc.paragraphs[0].text)
  print(doc.paragraphs[1].text)
  
  print(len(doc.paragraphs[1].runs))
  print(doc.paragraphs[1].runs[0].text)
  print(doc.paragraphs[1].runs[1].text)
  print(doc.paragraphs[1].runs[2].text)
  print(doc.paragraphs[1].runs[3].text)
  print(doc.paragraphs[1].runs[4].text)
  
  import P05_readDocx  # Don't do this, imports should be at the top of the file
  print(P05_readDocx.getText("demo.docx"))
  
subject: Update P04_readWord added P05_readDocx as a module example