6

I'm looking for a field calculator Python statement to delete only the first two letters of string entries. For Ex:

!Name!.strip([0:2])

I know this syntax is incorrect.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Mar 12, 2013 at 20:20
0

1 Answer 1

18

You slice the string to be the third character through the end of the string (strings are zero indexed).

!Name![2:]
answered Mar 12, 2013 at 20:37
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.