Arcpy loop through features. See the Code Sample at the bottom of that page.