I'm using ArcMap 10.8.1 so this is Python 2.7.
I'm trying to find the correct syntax to troubleshoot/debug this script that I'm working on. I was using the Python interpreter going line by line trying to resolve the issue and can't seem to figure out how to enter the codeblock into the interpreter. When I try to enter the codeblock as is I get a Syntax Error and I'm not skilled enough to know how to resolve it yet. It seems like the interpreter doesn't like the triple quotes for the codeblock. Any help is greatly appreciated!
expression = 'reclass(!{0}!,!{1}!,{2})'.format(lengthField, widthField, num)
codeblock = """ def reclass(lengthField,widthField,num):
if ((lengthField/num) >= (widthField)):
return 'True'
else:
return '' """