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.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.