From 3e18b6207a717c1ca01a306e77f74b9d12a50870 Mon Sep 17 00:00:00 2001 From: annu12340 <43414928+annu12340@users.noreply.github.com> Date: Sat, 2 Mar 2019 10:06:58 +0530 Subject: [PATCH] Create Text wrap.py --- python/strings/Text wrap.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 python/strings/Text wrap.py diff --git a/python/strings/Text wrap.py b/python/strings/Text wrap.py new file mode 100644 index 0000000..e29d1b5 --- /dev/null +++ b/python/strings/Text wrap.py @@ -0,0 +1,7 @@ + + +def wrap(string, max_width): + for i in range(0,len(string),max_width): + print(string[i:i+max_width]), + return "" +