Answer the question
In order to leave comments, you need to log in
How to remove blank pages from python word?
There is a Word file, how can I delete all empty pages from it?
I use either python-docx, but if there are any other methods, they will do.
Answer the question
In order to leave comments, you need to log in
I suppose that in the formula: sqrt(fabs(atan(k/2-1.5)))
it meant not k, but a[k].
But then the loop needs to be changed - now it's k from 1 to n, and should be from 0 to n - 1.
And all this is assigned to b[i], although i does not change in the loop. Probably need b[k].
PS formatting is just awful, you better fix it.
for paragraph in document.paragraphs:
if len(paragraph.text)==0:
paragraph.clear()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question