You are viewing a single comment's thread. Return to all comments →
def wrap(string, max_width): result = '' _start = int(0) _end = int(max_width) while _end < len(string): substring = string[_start: _end] result = result + substring + '\n' _start = _end _end = _end + max_width result = result + string[_start:] return result
Text Wrap
You are viewing a single comment's thread. Return to all comments →