I am novice in python and I am trying to run a function in the field calculator and I get this error. It drives me nuts. What is wrong?
Thank you.
Error:
error 000539: syntaxerror: invalid syntax (<expression>, line 1)
Pre-Logic Script Code:
def fnfindstation(addstation):
if addstation == "151" or addstation == "551":
formataddress ="Oleander Station 1 - Shift B"
elif addstation == "152" or addstation == "552":
formataddress ="Oleander Station 2 - Shift B"
else:
formataddress = "Outside Station"
return formataddress
Station =
fnfindstation=( !district!)