I have multiple layout and maps in my project, i want to activate each layout and do some processing like using definition queries on some layers, then create grid using those layer then finally print pdfs. Please advise ?
you need to explore the code snippets for the various objects and methods in the python section of the help.
For instance see the code examples in
Layout—ArcGIS Pro | Documentation
Explore the help page that Dan points to and you will see openView().