5 lines
89 B
Python
5 lines
89 B
Python
def truncate(text):
|
|
if len(text) <= 3:
|
|
return text
|
|
return text[:3] + ">"
|