import arcpy allFields=arcpy.ListFields("C://Path//To//Data.shp") for field in allFields: print "Field Name: "+ field.name #Do stuff here
import arcpy arcpy.env.workspace = r"C:\StatsCanada.gdb\Saskatchewan" featureclass = ("PopulatedCentres") allFields=arcpy.ListFields(featureclass) for field in allFields: if field.type in ["Double","Integer","SmallInteger"]: arcpy.SpatialAutocorrelation_stats(featureclass, field.name,"GENERATE_REPORT","INVERSE_DISTANCE","EUCLIDEAN_DISTANCE","NONE","#","#")