From 92e52c0cb202fef0628eba53eafd1d3d183ee6c1 Mon Sep 17 00:00:00 2001 From: PrayagG Date: Sun, 31 Oct 2021 15:02:24 +0530 Subject: [PATCH] Create PythonJoin --- PythonJoin | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 PythonJoin diff --git a/PythonJoin b/PythonJoin new file mode 100644 index 00000000..74aa149d --- /dev/null +++ b/PythonJoin @@ -0,0 +1,11 @@ +list1 = ['1','2','3','4'] + +s = "-" + +# joins elements of list1 by '-' +# and stores in sting s +s = s.join(list1) + +# join use to join a list of +# strings to a separator s +print(s)