Python truncate a long string

info = (data[:75] + '..') if len(data) > 75 else data

Leave a Comment