You are viewing a single comment's thread. Return to all comments →
Solution rs_str = "" counter = abs(len(string)/max_width)
while counter > -1: rs_str += string[:max_width]+'\n' string = string.removeprefix(string[:max_width]) counter -= 1
return rs_str `
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 →
Solution rs_str = "" counter = abs(len(string)/max_width)
while counter > -1: rs_str += string[:max_width]+'\n' string = string.removeprefix(string[:max_width]) counter -= 1
return rs_str `