import arcpy
arcpy.env.workspace = “I:\pystudy\shili”
… fcs = arcpy.ListFeatureClasses()
… fcs.sort()
… print fcs
… fcs.sort(reverse= True)
… print fcs
…
[u’fenyiaa.shp’, u’fenyiaa2.shp’, u’fenyibb.shp’, u’fenyibb2.shp’, u’fenyicc3.shp’, u’fycaijian.shp’, u’fydltb.shp’, u’fyxmq.shp’]
[u’fyxmq.shp’, u’fydltb.shp’, u’fycaijian.shp’, u’fenyicc3.shp’, u’fenyibb2.shp’, u’fenyibb.shp’, u’fenyiaa2.shp’, u’fenyiaa.shp’]
先按默认字母排序,再倒排序
最新推荐文章于 2022-02-17 15:54:08 发布