<?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: How to concatenate 'str' and 'int' objects with python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466454#M36462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14652785533818864" data-renderedposition="34_8_1315_16" jivemacro_uid="_14652785533818864"&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;str(!SHAPE.firstpoint.X!) + " " + str(!SHAPE.firstpoint.Y!)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jun 2016 05:49:16 GMT</pubDate>
    <dc:creator>FC_Basson</dc:creator>
    <dc:date>2016-06-07T05:49:16Z</dc:date>
    <item>
      <title>How to concatenate 'str' and 'int' objects with python</title>
      <link>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466453#M36461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying in a GDB using Arc10.2 to run a field calculate, into a text field using: "!SHAPE.firstpoint.X! &amp;amp;" "&amp;amp; !SHAPE.firstpoint.Y!" (without quotes) but this gives an error: 00539 &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="arcpyref"&gt;cannot concatenate 'str' and 'int' objects&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;What would be the correct syntax?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;I believe I need to cast but not sure how.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;So far my workaround is to create a StartX and StartY field then combine them into another field StartXY, but this can be time consuming with a large number of records. There should be a better way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;!SHAPE.firstpoint.X! = 534792.9044&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;!SHAPE.firstpoint.Y! = 6917050.0155&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;End result should look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;534792.9044 6917050.0155&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="arcpyref"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 05:33:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466453#M36461</guid>
      <dc:creator>AndrewNeedham</dc:creator>
      <dc:date>2016-06-07T05:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate 'str' and 'int' objects with python</title>
      <link>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466454#M36462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14652785533818864" data-renderedposition="34_8_1315_16" jivemacro_uid="_14652785533818864"&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;str(!SHAPE.firstpoint.X!) + " " + str(!SHAPE.firstpoint.Y!)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 05:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466454#M36462</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-06-07T05:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate 'str' and 'int' objects with python</title>
      <link>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466455#M36463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 05:59:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-concatenate-str-and-int-objects-with-python/m-p/466455#M36463</guid>
      <dc:creator>AndrewNeedham</dc:creator>
      <dc:date>2016-06-07T05:59:00Z</dc:date>
    </item>
  </channel>
</rss>

