Here is my current expression:
def FindLabel ( [FULL_NAME] ): fn = [FULL_NAME] if "COUNTY ROAD" in fn: return "CR " + fn[11:] elif "% COUNTY ROAD" in fn: return fn[:1] + "CR" + fn[13:] else: return fn
This is a valid expression but the line - elif "% COUNTY ROAD" in fn: return fn[:1] + "CR" + fn[13:] isn't working. Some county roads have a pre directional (i.e. E or W) then COUNTY ROAD XXXX. I am trying to return that pre-directional with % wildcard if it exists in the FULL_NAME field.
Is this not correct?