diff --git a/Insertion sort.py b/Insertion sort.py new file mode 100644 index 0000000..4b498e0 --- /dev/null +++ b/Insertion sort.py @@ -0,0 +1,15 @@ +#List taken from the user and sorted using insertion sort. + +print("Enter the list you want to sort(with spaces)") +l=list(map(int,input().split())) +n=len(l) +print("The list you entered: ",l) + +for i in range(1,n): + value = l[i] + pos=i + while pos>0 and value