"BN14 5RY".split()[0] # or "BN1 5RY".split()[0]
If your field contains string/text data, there is no need for the len method in Python since string data is an "iterable". For example>>> a = "abcdefghijklmnop" >>> b = a[:-4] >>> b 'abcdefghijkl' >>>
>>> a = "abcdefghijklmnop" >>> b = a[:-4] >>> b 'abcdefghijkl' >>>
Hello,I have postcodes which I need to cut down from say BN14 5RY to only BN14. I cannot simply use the 'left(input, n)' equation as some postcodes are only 6 figures long such as BN1 5RY and I always need the first 3/4 characters.Does anyone know a way to delete the last 3 characters?Thanks in advance.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.