LTrim operator in Python

204
3
Jump to solution
10-31-2019 07:36 AM
ScottLouque1
Occasional Contributor

What is the conversion in Python for LTrim and RTrim?

I would like to use them in my Field Calculator in ArcGIS Pro but they are not there

0 Kudos
1 Solution

Accepted Solutions
Per_Åke_MattiasWallin
New Contributor III

Scott,

I think you are looking for rstrip() and lstrip().

ArcGIS Pro field calculator:

Python example:

View solution in original post

3 Replies
Per_Åke_MattiasWallin
New Contributor III

Scott,

I think you are looking for rstrip() and lstrip().

ArcGIS Pro field calculator:

Python example:

View solution in original post

ScottLouque1
Occasional Contributor

Thank you!

0 Kudos
ScottLouque1
Occasional Contributor

Another question.

I am trying to use the Mid() function in the field calculator.

!STR_NAME!.Mid(5, 20)

but it gives me a throwback error when I Run it

Can someone tell me why?

0 Kudos