Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Use rfind, Luke! solution in Clear category for Cut Sentence by obone
cut_sentence = lambda line, length: \
line if len(line) <= length else line[:max(0, line.rfind(' ', 0, length + 1))] + '...'
July 17, 2019
Comments: