Untitled
unknown
python
3 years ago
173 B
9
Indexable
def abreviater(word):
if len(word) > 10:
word = f"{word[0]}{len(word)-2}{word[-1]}"
return word
for i in range(int(input())):
print(abreviater(input()))Editor is loading...
def abreviater(word):
if len(word) > 10:
word = f"{word[0]}{len(word)-2}{word[-1]}"
return word
for i in range(int(input())):
print(abreviater(input()))