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)