While modeling analysis in ModelBuilder has its drawbacks, there is one fantastic option built into ModelBuilder; the ability to create a model and then export the model to Python. Along with the ArcGIS help documentation, it is the best way to discover the correct Python syntax to use when writing ArcPy scripts.
Create a folder that can hold the exported scripts next to the SanFrancisco geodatabase (for example,
C:\Projects\Scripts). This will hold both the exported scripts that ArcGIS automatically generates, and the versions that we will build from those generated scripts.
Open the model called Chapter3Model1 and click on the Model menu in the upper left. Select Export from the menu, and then select ...