Dear Community~~
def abbreviate(x):words = x.split()letters = [word[:3] for word in words]return "".join(letters)
I want to make it like the picture below.What should I do?
Thank You~~
A solution is this:
def abbreviate(x): words = x.split() letters = [word[:3] + " / " for word in words] text = "".join(letters) text = text[:-3] # Remove last slash return text
Just the following expression should work. No Code Block required.
'/'.join([i[0:3] for i in !Name_Add1!.split(' ')])
It's incredible.~~~~
Thank you so m~~~~uch.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.