I am looking for three table names in my GDB. Is there a way to put this into one statement
Im trying to use wildcard with * to grab all instances of that name
ListTables ({wild_card}, {table_type})
tablesList1 = arcpy.ListTables("*TBL_BMP_*")
tablesList2 = arcpy.ListTables("*SDE_BMP_Component*")
tablesList3 = arcpy.ListTables("*SDE_BMP_Inventory*")
tablesList1 = arcpy.ListTables("[*TBL_BMP_*,*SDE_BMP_Component*,*SDE_BMP_Inventory*]")
Solved! Go to Solution.
I think I can get it with this? Testing now..
FCS = set(arcpy.ListTables("X_*") + arcpy.ListTables("*_Y"))
I think I can get it with this? Testing now..
FCS = set(arcpy.ListTables("X_*") + arcpy.ListTables("*_Y"))
This is untested, but you get the idea.
tables_found = []
for wildcard_name in ["*TBL_BMP_*", "*SDE_BMP_Component*", "*SDE_BMP_Inventory*"]:
tables_found += arcpy.ListTables(wildcard_name)