AnsweredAssumed Answered

If Statement: Operators == and +/-

Question asked by bgale88 on Feb 15, 2012
Latest reply on Feb 16, 2012 by bgale88

I am creating my first python script and cannot not seem to find the help I'm looking for in the ArcGIS Resource Center (please tell me if you can). How do I create an if statement using the 'equal to' operator? What I want my code to look like is basically this:

if table1Count == table2Count:
...     (continue onto the next step...)

The 'table1Count' and table2Count' are already set as variables.

Furthermore, how do I create this type of statement using some sort of +/-? I want the value of table2Count to be +/- 10 of the table1Count. Would something close to this work?
if table2Count >= table1Count - 10 AND table2Count <= table1Count + 10:

Thank you for your help!