Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Thanks a lot

share|improve this question
    
Thanks Blored-castillo, Thanks, this worked great! –  user25771 Feb 11 at 16:49
add comment

1 Answer 1

up vote 8 down vote accepted

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

!Name![2:]
share|improve this answer
    
Great! Thanks a lot. –  tdr Mar 12 '13 at 20:54
    
Remember to mark the answer as accepted if it works for you :) –  blord-castillo Mar 12 '13 at 20:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.