Usually one can get the list of field/column names using the following code. Now, I would like to store the field names as strings in a variable. How can I do this?
Desired output:
var = ("Field 1", "Field2", "Field.3")
Another try (does not work either):
for field in fields:
var = str(field.name)Current code:
fields = arcpy.ListFields('df')
# Show column names
for field in fields:
print(field.name)