diff --git a/2022-Oct/03 Oct 2022/sumudu_sujith.py b/2022-Oct/03 Oct 2022/sumudu_sujith.py new file mode 100644 index 00000000..f8dbb952 --- /dev/null +++ b/2022-Oct/03 Oct 2022/sumudu_sujith.py @@ -0,0 +1,2 @@ +x=input("enter the string : ") +print("new string : ",x.swapcase()) \ No newline at end of file diff --git a/2022-Oct/09 Oct 2022/sumudu_sujith.py b/2022-Oct/09 Oct 2022/sumudu_sujith.py new file mode 100644 index 00000000..55eebc5a --- /dev/null +++ b/2022-Oct/09 Oct 2022/sumudu_sujith.py @@ -0,0 +1,9 @@ +#sumudusujith +s=input("enter first string--") +a=[] +for i in range(len(s)): + for j in range(i,len(s)): + b=s[i:j+1] + a.append(b) +c=sorted(a,key=len) +print(c) \ No newline at end of file