May-14-2023, 01:36 PM
Hello,
I need to exclude pages in a loop, but those exceptions could be several pages, so I need to find a way to specify individual pages as well as a range of pages:
Thank you.
I need to exclude pages in a loop, but those exceptions could be several pages, so I need to find a way to specify individual pages as well as a range of pages:
numpages = doc.page_ount #TODO How to use ranges in range, eg. [1-14,25,35-41,57]? exclude = [1,2,3,4,5] for index in numpages: if not exclude[index]: #do stuffDo you know of a way to do this?
Thank you.