You are viewing a single comment's thread. Return to all comments →
def wrap(string, max_width): count = 0 y = "" for i in string:
if count == max_width: y = y + "\n" count = 0 y += i count += 1 return y
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 →
def wrap(string, max_width): count = 0 y = "" for i in string: