Just for comparison purposes (and for the record, I’m all for a bit of Python to solve a problem ), here’s an example which splits out chunks of PDFs to separate files.
pdftk foo-bar.pdf cat 1-12 output foo.pdf
pdftk foo-bar.pdf cat 13-end output bar.pdf
Excerpt from https://stackoverflow.com/questions/17776582/split-a-pdf-in-two
This one combined two PDFs into one.
pdftk in1.pdf in2.pdf cat output out1.pdf
Example taken from https://www.pdflabs.com/docs/pdftk-cli-examples/
This removes pages 11 through 20 and output to a new PDF.
pdftk in.pdf cat 1-10 21-end output out1.pdf
Example based on one taken from https://www.pdflabs.com/docs/pdftk-cli-examples/