You are viewing a single comment's thread. Return to all comments →
def wrap(string, max_width): new_string = "" for i, letter in enumerate(string): i += 1 width_mod = i % max_width if width_mod == 1 and i != 1: new_string += "\n" new_string += letter return new_string
Seems like cookies are disabled on this browser, please enable them to open this website
Text Wrap
You are viewing a single comment's thread. Return to all comments →