I have code that gives me a list of fields from a list of tables. Problem is I want to write them into another table for analysis and can't figure out how to do that. My list looks like this:
Result of print:
[u'Field1', u'Field2', u'Field3'] Table1...........and so on for each table
My goal is to append or use a cursor into a database table (2 columns):
FIELD TABLE
Field1 Table1
Field2 Table1
Field3 Table1
All I can figure out to do with a field name list is print and use append/count/reverse ect. Any suggestions?
Result of print:
[u'Field1', u'Field2', u'Field3'] Table1...........and so on for each table
Code:
>>> import arcpy
>>> arcpy.env.workspace = "H:/TableList.gdb"
>>> tbl = arcpy.ListTables("*")
>>> for table in tbl:
... ft = [f.name for f in arcpy.ListFields(table)]
... print("{0}".format(ft)) + table
...My goal is to append or use a cursor into a database table (2 columns):
FIELD TABLE
Field1 Table1
Field2 Table1
Field3 Table1
All I can figure out to do with a field name list is print and use append/count/reverse ect. Any suggestions?