I'm trying to do a Field Calculation in ArcGIS 10.3 (Python 2.7) that uses the Codeblock (Pre-Logic Script Code) to evaluate the attributes in a different field to inform the calculation).
Here's an example of what I'm trying to do (but getting syntax errors):
def evalStreetType(TYPEFIELD): if (TYPEFIELD LIKE "St*"): return "Street" elif (TYPFIELD LIKE "Av*"): return "Avenue" elif (TYPEFIELD LIKE "P*k*wy*): return "Parkway" else: return TYPEFIELD
And then the field calculator will say [StreetType] =
Hopefully I didn't introduce new syntax errors as I simplify things to post in this question. I believe the crux of my problem is that I'm phrasing my "LIKE" statement and using wildards in a SQL sort of way, and it's not how Python does it. But I'm not sure now to evaluate strings with wildcards in python (....obviously).
Can someone help me out!??