def get_all_paragraphs(document):
    for paragraph in document.paragraphs:
        yield paragraph
for table in document.tables:
    for row in table.rows:
        for cell in row.cells:
            for paragraph in cell.paragraphs:
                yield paragraph
Объединить циклы Python в For-Loops