I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd) I currently have this script (attached) which works for exporting single pages; and the highlighted section was my intial (poor) attempt to export all pages based on what I have seen or read.

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/pkXvB.jpg