7 lines
159 B
Python
7 lines
159 B
Python
import re
|
|
|
|
WORD_REGEX = re.compile(r"([^\W_]+(?:'[^\W_]+)?)")
|
|
|
|
|
|
def abbreviate(words):
|
|
return ''.join(s[0].upper() for s in re.findall(WORD_REGEX, words))
|