Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

list sort python

Python Program to get list size n and n elements of list, then sort the elements of list in ascending order.

Sample Input 1:

5 5 7 9 3 1

Sample Output 1:

1 3 5 7 9

Program or Solution

l=list(map(int,input("Enter Numbers:").split()))
for i in range(0,len(l)-1):
    for j in range(0,len(l)-1):


Program Explanation

Bubble Sort Algorithm: Refer :