You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def wrap(string, max_width):
l = []
i = 0
while True:
if (i+max_width-1)<len(string)-1:
l.append(string[i:i+max_width])
i = i+max_width
else:
l.append(string[i:])
break
return '\n'.join(l)