AnsweredAssumed Answered

What is the proper way to do for and if statements in python?

Question asked by apmartincude on Aug 2, 2017
Latest reply on Aug 2, 2017 by xander_bakker

I am having issues with loops and if statements in python. I keep getting an error on the last line. What am I doing wrong?


import arcpy
from import *
from arcpy import env


desc= arcpy.Describe(sorder)

xmin= desc.extent.XMin
xmax= desc.extent.XMax
ymax= desc.extent.YMax
count= 0

for columns in range (xmin, xmax):
  pointval= arcpy.GetCellValue_management(sorder,"%s %s" % (columns++,ymin), "1")
  if (pointval== 1, pointval==2, pointval==3):
print "count= %s" % (count)