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~~
Solved! Go to Solution.
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
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
It's incredible.~~~~
Thank you so m~~~~uch.
Just the following expression should work. No Code Block required.
'/'.join([i[0:3] for i in !Name_Add1!.split(' ')])