Working with the ArcPy list functions
Getting a list of data is often the first step in a multistep geoprocessing operation. ArcPy provides many list functions that you can use to gather lists of information, whether they are feature classes, tables, workspaces, and so on. After gathering a list of data, you will often perform geoprocessing operations against the items in the list. For example, you might want to add a new field to all the feature classes in a file geodatabase. To do this, you'd first need to get a list of all the feature classes in the workspace. In this recipe, you'll learn how to use the list functions in ArcPy by working with the ListFeatureClasses()
function. All the ArcPy list functions work in the same fashion.
Getting ready ...
Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.