<?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 Field Calculator Equivalent [:] of Right( ) or Left( ) in VB Field Calcula in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-field-calculator-equivalent-of-right-or/m-p/567723#M44474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's called a "slice" (I think it's because you are slicing the string, like cutting a stick of butter in half with a knife).&amp;nbsp; Anyway, here's a link to a page that explains more about it and shows examples:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/tutorial/introduction.html#strings"&gt;http://docs.python.org/tutorial/introduction.html#strings&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll have to scroll about halfway down the page to get to the parts about slicing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jan 2011 18:09:03 GMT</pubDate>
    <dc:creator>ZoeZaloudek</dc:creator>
    <dc:date>2011-01-06T18:09:03Z</dc:date>
    <item>
      <title>Python Field Calculator Equivalent [:] of Right( ) or Left( ) in VB Field Calculator</title>
      <link>https://community.esri.com/t5/python-questions/python-field-calculator-equivalent-of-right-or/m-p/567722#M44473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm starting to use Python in the Field Calculator and I just found this out after an hour or so of frustration using rstrip() and rsplit() realized its even easier though not as obvious. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So lets say I wanted to remove the leading character of a 8 digit string in my [UID] field&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In VB I'd say:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right([UID], 7)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Python I'm saying&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;!UID![1:]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may put numbers after the colon [1:4] as well to manipulate the return string lengths and where the string is pulling those lengths from, other than that I don't know but it may help if someone knows the name of this function - if so please comment below?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 17:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-field-calculator-equivalent-of-right-or/m-p/567722#M44473</guid>
      <dc:creator>DanielSheehan</dc:creator>
      <dc:date>2011-01-06T17:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Python Field Calculator Equivalent [:] of Right( ) or Left( ) in VB Field Calcula</title>
      <link>https://community.esri.com/t5/python-questions/python-field-calculator-equivalent-of-right-or/m-p/567723#M44474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's called a "slice" (I think it's because you are slicing the string, like cutting a stick of butter in half with a knife).&amp;nbsp; Anyway, here's a link to a page that explains more about it and shows examples:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/tutorial/introduction.html#strings"&gt;http://docs.python.org/tutorial/introduction.html#strings&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll have to scroll about halfway down the page to get to the parts about slicing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jan 2011 18:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-field-calculator-equivalent-of-right-or/m-p/567723#M44474</guid>
      <dc:creator>ZoeZaloudek</dc:creator>
      <dc:date>2011-01-06T18:09:03Z</dc:date>
    </item>
  </channel>
</rss>

