Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 at 16:49
up vote 10 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

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.