Hi EricG,
It depends on the context. I think what you are saying is that you have a dataset that has a geoid field and want to do this:
-- Add a TRACT field to the dataset.
-- Set the tract field to the last 6 characters of the geoid.
Again without more context, it's difficult to guide you on the details, but assuming you're talking about a field in a dataset that is iterable with a cursor, you could do something like this:
import arcpy
arcpy.env.workspace = "C:/mydatapath.gdb" # modify to reflect your workspace
theData = "/mydata" # modify to dataset with a geo_id column
theGEOIDfield = "GEOID" # modify to geo id column name
arcpy.management.AddField(theData, "TRACT", "TEXT")
with arcpy.da.UpdateCursor(theData, [theGEOIDfield, "TRACT"]) as uc:
for row in uc:
row[1] = row[0][-6:] # Set TRACT to the last 6 digits of the GEOID.
uc.updateRow(row) # Commit the change.
del uc