I am trying to join multiple fields using an update cursor, I want to trim a filed to a specific length while the cursor iterates through and adds another field to the final string. I am working with a streets data set and will need to do this for streets that have no pre direction and streets that have a pre direction. I want to take only the first 5 character of the street name when there is no pre directions and the first 3 character when there is a pre direction.
When I run this script (testing it only for streets with no pre direction) I do not get any errors but nothing is updated in the feature class.
fc = r'C:\Users\achapman\Documents\18_0157_Woodlands_TX\WOODLANDS_TX.gdb\WOODLANDS_CL_WGS84'
pbid = ['PRE_DIR', 'ST_NAME', 'ST_TYPE', 'pBID']
with arcpy.da.UpdateCursor(fc,pbid) as pbid_cursor:
for row in pbid_cursor:
if (row  is None):
row = (row[:5]) + row