I want to create 12 feature classes from a tuple, and I would like to have specific names that start form well_0
and end with well_11
.
in_FC = "E:/gis payannameh/TABU search/data/90spring_new.shp"
out_FC = r'E:\gis payannameh\Pychram_tabu\output.gdb'
well = ('10,24,38,41', '17,26,34,47', '5,7,18,25', '7,12,26,46', '2,12,23,36', '7,18,21,43', '2,13,16,39', '5,8,32,43', '1,9,17,44', '8,13,30,46', '2,14,34,37','3,15,12,9')
for i in range(len(well)):
templayer = "templayer_{}".format(i)
sql = """ {0} IN ({1})""".format("FID",well[i])
arcpy.MakeFeatureLayer_management(in_FC,"templayer",sql)
arcpy.FeatureClassToFeatureClass_conversion(templayer,out_FC,"well_{}".format(i))
but when I use ListFeatureClasses
for i=2
it shows well_10
, [well_0,well_1,well_10,well_11,well_2,...well_9]
.I would Like to create each feature class'name with its index name(i
) regularly something like [well_0,well_1,well_2,...,well_11]
.