I am trying to calculate a roadway pedestrian restriction based on its functional class, using if/else logic in Python. Every time I enter this, it only turns up 'No'. The categories are strings, and I am hoping to return strings. I have double-checked that the arguments for the values in FUNC_CLASS are accurate, so I am not sure why it will only turn up 'No's. I'm new to Python.
def Reclass(function): if (function =="U / FWY OR EXP") or (function =="R / INTERSTATE") or (function =="U / INTERSTATE"): return 'Yes' else: return 'No'
Reclass ( !FUNC_CLASS! )