<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python script if/for/while in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52582#M4165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I noticed how the row corresponded with each position in the variable list, but I didn't realize that I would use the actual "row" nomenclature for the variable in the concatenation.&amp;nbsp; That did the trick!&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Thanks once again, &lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/people/dkwiens"&gt;dkwiens&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;!&amp;nbsp; I'm very thankful for people like you and &lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/people/Dan_Patterson"&gt;Dan_Patterson&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="j-post-author"&gt;&lt;/SPAN&gt;&lt;SPAN class="j-post-author"&gt;!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2015 20:24:49 GMT</pubDate>
    <dc:creator>CoyPotts1</dc:creator>
    <dc:date>2015-07-09T20:24:49Z</dc:date>
    <item>
      <title>Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52575#M4158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*UPDATE*&lt;/P&gt;&lt;P&gt;For samples of the correct code, see posts below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll start off by apologizing for not having any sort of sample of my code, but I am really just unsure on how to begin the code, so all I have is notes of what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature class that has a number of fields that are duplicated for 5 different customers.&amp;nbsp; The fields that I need to focus on in this exercise are the Cust1Name, Cust1NodeID, Cust1HomeID, and 10 Cust1CircuitID fields.&amp;nbsp; I'm using "Cust1", "Cust2", etc only as examples in place of their actual names...just stating that to eliminate your efforts in trying to add the customer number in a potential for/while loop.&amp;nbsp; Essentially the fields look as they do below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cust1Name&lt;/P&gt;&lt;P&gt;Cust1NodeID&lt;/P&gt;&lt;P&gt;Cust1HomeID&lt;/P&gt;&lt;P&gt;Cust1CircuitID1&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Cust1CirctuitID10&lt;/P&gt;&lt;P&gt;Cust2Name&lt;/P&gt;&lt;P&gt;Cust2NodeID&lt;/P&gt;&lt;P&gt;Cust2HomeID&lt;/P&gt;&lt;P&gt;Cust2CircuitID1&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Cust2CircuitID10&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My feature class has fields for all 5 customers, but not all 5 will be populated.&amp;nbsp; I've used the Cust#NodeID field as my reference for whether calculations will run or not because that field determines if they are needed or not.&amp;nbsp; Populated means run the calculation, while Null means do nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if Cust1NodeID != None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return # insert calculation here
else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return None&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also need to get a users input to know the amount of circuit ID's needed.&amp;nbsp; The number varies from 1 to 10 circuit ID's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;numberIDs = arcpy.GetParameterAsText(0)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this information I need the script to go through each Cust#NodeID field to check and see if it's null or not.&amp;nbsp; If it's null, keep moving...if it has data, calculate the amount of circuit ID fields needed based on the input.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Again, sorry for having nothing to start with.&amp;nbsp; I'm just confused on which route to take (for loop, while loop, if/if...), and I can't figure out any of them either way.&amp;nbsp; I'm just not sure how to add so many arguments together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*EDIT*&lt;/P&gt;&lt;P&gt;I'll also note that the circuit ID calculation itself is just a concatenation of the given fields, as shown below:&lt;/P&gt;&lt;P&gt;Cust1CircuitID1 = (Cust1Name) - (Cust1NodeID) - (Cust1HomeID) - (01)&lt;/P&gt;&lt;P&gt;Cust1CircuitID2 = (Cust1Name) - (Cust1NodeID) - (Cust1HomeID) - (02)&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52575#M4158</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2021-12-10T22:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52576#M4159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Until you've got more, it's hard to help. You almost certainly need to use a &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/SearchCursor/018w00000011000000/"&gt;SearchCursor &lt;/A&gt;(to read) or &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/UpdateCursor/018w00000014000000/"&gt;UpdateCursor &lt;/A&gt;(to read/write) to loop through your records. Is that the missing piece?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 17:05:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52576#M4159</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-09T17:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52577#M4160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be useful if you recorded your workflow.&amp;nbsp; Specifically, do you use tools in ArcToolbox...like calculating values for fields, or doing selections... or are you doing things through their menu/tool/button equivalent in ArcMap.&amp;nbsp; It is much easier to produce a script if you can replicate your workflow through arctoolbox tools and examine/copy the documentation from the Results Window (customize menu) to begin structuring your work (several options are documentated on my blog)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 17:36:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52577#M4160</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-07-09T17:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52578#M4161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The UpdateCursor method works wonders, but I can't seem to get the string portion of the return calculation to work properly.&amp;nbsp; It keeps returning a literal string.&amp;nbsp; I tried single quotes, and I tried ' """ + var + "" ' both with an without the space in between, and I just kept getting a literal string.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

numIDs = arcpy.GetParameterAsText(0) # I equaled this to 1 in my testing to see if it would ignore CircuitID2 and it did
fc = r'my node feature class'
fields = ('Cust1NodeID', 'Cust1HomeID', 'Cust1Name', 'Cust1CircuitID1', 'Cust1CircuitID2', 'Cust1CircuitID3', 'Cust1CircuitID4', Cust1CircuitID5', 'Cust1CircuitID6', 'Cust1CircuitID7', 'Cust1CircuitID8', 'Cust1CircuitID9', 'Cust1CircuitID10')

with arcpy.da.UpdateCursor(fc, fields) as cursor:

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] != None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + Cust1Name + ") - (" + Cust1NodeID + ") - (" + Cust1HomeID + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif (row[0] != None and numIDs &amp;gt;= 2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + Cust1Name + ") - (" + Cust1NodeID + ") - (" + Cust1HomeID + ") - (02)"

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This runs through and only updates Cust1CircuitID1, but I just need to get over the whole literal string hand up.&amp;nbsp; I only wrote it out to calculate the first two CircuitID fields, but as my script note above states, I set the variable to 1 so that it would only calculate the first one.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've seen the UpdateCursor function in other code samples, and I've seen reference to it, but I haven't tried it yet.&amp;nbsp; Glad your suggestion led me to do a little research and learn it a little better &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;.&amp;nbsp; I'll likely be going back and updating some other code that I've created using this method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52578#M4161</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2021-12-10T22:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52579#M4162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use a script that calculates a lot of fields and runs a lot of summary statistics before exporting the results to Excel tables (a lot of the work that you have helped me with in other posts over the previous weeks).&amp;nbsp; That script is ran from an ArcToolbox within ArcMap.&amp;nbsp; This script is ran after we have created the data and made sure that all of the manually populated fields are populated, and then this script populates the rest and exports for us.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially the circuit ID fields have either gone unpopulated or done manually by the users, and I've been trying find the time to go through and figure out a way to automate the process of their creation.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I could technically just do individual calculations for every single CircuitID field, but there are 10 per customer, and 5 total customers, so I would prefer not to rewrite the code for all 50 fields.&amp;nbsp; &lt;A href="https://community.esri.com/migrated-users/19932"&gt;Darren Wiens&lt;/A&gt;​'s suggestion above seems to be a good solution, and I think I have it nearly worked out, with the exception of the string issue.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52579#M4162</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2015-07-09T19:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52580#M4163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;The values in the cursor are accessed according to their position in the fields list:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14364718500328883 jive_text_macro" data-renderedposition="47_8_912_32" jivemacro_uid="_14364718500328883"&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;fields = (&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;'Cust1NodeID', 'Cust1HomeID', 'Cust1Name', 'Cust1CircuitID1', 'Cust1CircuitID2', 'Cust1CircuitID3', 'Cust1CircuitID4', Cust1CircuitID5', 'Cust1CircuitID6', 'Cust1CircuitID7', 'Cust1CircuitID8', 'Cust1CircuitID9', 'Cust1CircuitID10'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;...corresponds to indexed values:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14364718576707446 jive_text_macro" data-renderedposition="139_8_912_16" jivemacro_uid="_14364718576707446"&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;row[0], row[1], row[2], ..., row[12]&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;So, to access the value in the Cust1Name position, you would use the value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14364718705086979 jive_text_macro" data-renderedposition="215_8_912_16" jivemacro_uid="_14364718705086979"&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;row[2]&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;... rather than Cust1Name.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 20:00:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52580#M4163</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-09T20:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52581#M4164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or as Xander has suggested on a few occasions..before the&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;Cust1NodeID = row[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt; Cust1HomeID = row[1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;for row in rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&amp;nbsp; then you can use their names&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;or you could also unwrap the args&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;SPAN class="string"&gt;Cust1NodeID, Cust1HomeID = row # or fields&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;but I haven't got a file to check&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 20:23:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52581#M4164</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-07-09T20:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52582#M4165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I noticed how the row corresponded with each position in the variable list, but I didn't realize that I would use the actual "row" nomenclature for the variable in the concatenation.&amp;nbsp; That did the trick!&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Thanks once again, &lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/people/dkwiens"&gt;dkwiens&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;!&amp;nbsp; I'm very thankful for people like you and &lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/people/Dan_Patterson"&gt;Dan_Patterson&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="j-post-author"&gt;&lt;/SPAN&gt;&lt;SPAN class="j-post-author"&gt;!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 20:24:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52582#M4165</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2015-07-09T20:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52583#M4166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the code have the ability to step through each row and update them accordingly?&amp;nbsp; In my example above the first line simply checks to see if the NodeID field is populated, and then if so it updates the CircuitID1 field.&amp;nbsp; However, the second line checks whether the NodeID field is populated AND if the input variable is &amp;gt; or = to 2, and if so it updates the CircuitID2 field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example above I used an input value of 1 just to see if it would stop there and not calculate the 2nd, and it seemed to work, but I believe it did for unwanted reasons.&amp;nbsp; When I change the input variable to 2, the second line still doesn't calculate.&amp;nbsp; If I remove the first line altogether and just run the second line, it populates the CircuitID2 field correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally the code should step through each if statement, check the parameters, and conditionally update the corresponding field below it, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if NodeID != None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; calculate CircuitID1
elif NodeID != None and input variable &amp;gt;= 2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; calculate CircuitID2
elif NodeID != None and input variable &amp;gt;= 3:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; calculate CircuitID3&lt;/PRE&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I input 4, it'll update CircuitID1, 2, 3, and 4.&amp;nbsp; However, if I only put 1, it'll update just CircuitID1.&amp;nbsp; Is that not the way it should work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52583#M4166</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2021-12-10T22:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52584#M4167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The actual code that I used that doesn't update both the if and elif is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

numIDs = 2
fc = r'my node feature class'
fields = ('NodeID', 'HomeID', 'CustName', 'CircuitID1', 'CircuitID2')

with arcpy.da.UpdateCursor(fc, fields) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] != None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)" # this works fine
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif row[0] != None and numIDs &amp;gt;= 2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (02)" # this one won't run
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I take the elif statement exactly as it is and put it in the if portion, it works, so I know the syntax is there for it to work, but something isn't allowing it to work in tandem with the other in an if/elif/elif/elif/elif format.&amp;nbsp; When I run it just as it it typed above, it just runs through and updated the first if, and ignores the second.&amp;nbsp; Any ideas why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52584#M4167</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2021-12-10T22:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52585#M4168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The if, elif, statement will only get past into the if section&lt;/P&gt;&lt;P&gt;if row[0] != None:&lt;/P&gt;&lt;P&gt;it will never see the elif section unless you provide a condition for the condition where numIDs &amp;lt; 2 ... like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; (row[0] != None) &amp;amp; (numIDs &amp;lt; 2):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do stuff&lt;/P&gt;&lt;P&gt;elif&amp;nbsp; blah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; blah&lt;/P&gt;&lt;P&gt;cursor.updateRow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this logic is also flawed potentially.&amp;nbsp; Do you want the cursor to be updated if row[0] is = None???&lt;/P&gt;&lt;P&gt;perhaps your logic should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if&amp;nbsp; (row[0] != None):
&amp;nbsp;&amp;nbsp;&amp;nbsp; if numIDs &amp;lt; 2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number"&gt;3&lt;/SPAN&gt;] = &lt;SPAN class="string"&gt;"("&lt;/SPAN&gt; + row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;] + &lt;SPAN class="string"&gt;") - ("&lt;/SPAN&gt; + row[&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;] + &lt;SPAN class="string"&gt;") - ("&lt;/SPAN&gt; + row[&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;] + &lt;SPAN class="string"&gt;") - (01)"&lt;/SPAN&gt; &lt;SPAN class="comment"&gt;# this works fine&lt;/SPAN&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword"&gt;else&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number"&gt;4] = &lt;SPAN class="string"&gt;"("&lt;/SPAN&gt; + row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;] + &lt;SPAN class="string"&gt;") - ("&lt;/SPAN&gt; + row[&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;] + &lt;SPAN class="string"&gt;") - ("&lt;/SPAN&gt; + row[&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;] + &lt;SPAN class="string"&gt;") - (02)"&lt;/SPAN&gt; &lt;SPAN class="comment"&gt;# this one won't run&lt;/SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52585#M4168</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T22:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52586#M4169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If row[0] has a null value, then I want the script to return nothing.&amp;nbsp; Basically if there is no node name, then we don't need a circuit ID for that node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran the following samples and got different errors with each:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (row[0] != None):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (numIDs == 1):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif (numIDs == 2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (02)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)
&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;This returns the error message:&lt;/P&gt;&lt;P&gt;"Parsing error SyntaxError: EOL while scanning string literal (line 16)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (row[0] != None) &amp;amp; (numIDs &amp;lt; 2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif (row[0] != None) &amp;amp; (numIDs &amp;lt; 3):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (02)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns the error message:&lt;/P&gt;&lt;P&gt;"Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 16, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;TypeError: coercing to Unicode: need string or buffer, NoneType found"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52586#M4169</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2021-12-10T22:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52587#M4170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First error: you need a colon after the elif statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14365531822998372 jive_text_macro" data-renderedposition="50_8_912_18" jivemacro_uid="_14365531822998372"&gt;&lt;SPAN style="font-size: 9pt; font-style: inherit; font-weight: inherit; line-height: 1.5;"&gt;elif (numIds == 2):&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second error: I don't believe '&amp;amp;' is a valid Python operator. Use 'and' instead at both places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_14365532626475915 jive_macro_code jive_text_macro" data-renderedposition="131_8_912_16" jivemacro_uid="_14365532626475915"&gt;&lt;P&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; (row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green; background-color: #f6f6f6;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;] != &lt;/SPAN&gt;&lt;SPAN class="special" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;) and (numIDs &amp;lt; &lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green; background-color: #f6f6f6;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;): &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 18:36:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52587#M4170</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-10T18:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52588#M4171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;too much NumPy ... you are right&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 18:57:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52588#M4171</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-07-10T18:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52589#M4172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The colon was missing only in entry error...I manually typed out the code because whenever I try to paste into the syntax highlighter it ends up cutting off pieces.&amp;nbsp; (I just tested and realized that you could paste the code first and then apply the syntax highlighting...doh!&amp;nbsp; Nothing like a simple mistake to make you feel dumb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only used "&amp;amp;" because that's what Dan used in his examples.&amp;nbsp; I substituted "and" in the same sample that was using "&amp;amp;", and I get the same error message:&lt;/P&gt;&lt;P&gt;"Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 16, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;TypeError: coercing to Unicode: need string or buffer, NoneType found"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 18:59:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52589#M4172</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2015-07-10T18:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52590#M4173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;I suspect the problem is trying to write null values, but haven't tested it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; row &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; cursor:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; (row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] != &lt;/SPAN&gt;&lt;SPAN class="special" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;) and (numIDs &amp;lt; &lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;):&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - (01)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;elif&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; (row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] != &lt;/SPAN&gt;&lt;SPAN class="special" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;) and (numIDs &amp;lt; &lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;):&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - (01)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; + row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;] + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;") - (02)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass # do nothing and move to next row&lt;/SPAN&gt;

&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row) &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52590#M4173</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-10T22:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52591#M4174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;None null, none, nadda can be trapped by a truth test rather than a comparison test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; vals = [None,1,2,3]
&amp;gt;&amp;gt;&amp;gt; for val in vals:
...&amp;nbsp; if val:
...&amp;nbsp;&amp;nbsp; print "val is"
...&amp;nbsp; else:
...&amp;nbsp;&amp;nbsp; print "val isn't"
...&amp;nbsp;&amp;nbsp; 
val isn't
val is
val is
val is
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So perhaps you should be looking at getting rid of your ...if row[0] != None: stuff and just using&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0]:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52591#M4174</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T22:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52592#M4175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used your suggestion on all previous versions of the code and none worked.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(param1 and param2)&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (row[0] and numIDs &amp;lt; 2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif (row[0] and numIDs &amp;lt; 3):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (02)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;P&gt;Returns this errors:&lt;/P&gt;&lt;P&gt;"Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 16, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;TypeError: coercing to Unicode: need string or buffer, NoneType found"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(param1) and (param2)&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (row[0]) and (numIDs &amp;lt; 2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif (row[0]) and (numIDs &amp;lt; 3):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (02)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;P&gt;Returns the same error to the letter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Lastly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if param1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if param2&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0]:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if numIDs &amp;lt; 2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif row[0]:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if numIDs &amp;lt; 3:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (01)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = "(" + row[2] + ") - (" + row[0] + ") - (" + row[1] + ") - (02)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one doesn't seem to do anything.&amp;nbsp; I'm not even sure if it runs.&amp;nbsp; It doesn't kick back an error, but it also doesn't update the fields. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52592#M4175</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2021-12-10T22:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52593#M4176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your suggestion with the same three scenarios as shown in my response to Dan (below), and I got the following results in order from top example to bottom:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1:&lt;/P&gt;&lt;P&gt;"Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 17, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;TypeError: coercing to Unicode: need string or buffer, NoneType found"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2:&lt;/P&gt;&lt;P&gt;"Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 16, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;TypeError: coercing to Unicode: need string or buffer, NoneType found"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 3:&lt;/P&gt;&lt;P&gt;Same as explained in my response to Dan where it seems like nothing really happens. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 20:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52593#M4176</guid>
      <dc:creator>CoyPotts1</dc:creator>
      <dc:date>2015-07-10T20:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python script if/for/while</title>
      <link>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52594#M4177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't concatenate strings and numbers. To convert numbers to strings, use str():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_1436562431224275 jive_macro_code jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_1436562431224275"&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;] = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;"("&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; + str(row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;]) + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; + str(row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;]) + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;") - ("&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; + str(row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;]) + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;") - (01)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 21:07:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-if-for-while/m-p/52594#M4177</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-10T21:07:18Z</dc:date>
    </item>
  </channel>
</rss>

