Bubble Sort Program to sort a list March 01, 2020 aList=[15,6,13,22,3,52,2] print("original List is:",aList) n=len(aList) for i in range(n): for j in range(0,n-i-1): if aList[j]>aList[j+1]: aList[j],aList[j+1]=aList[j+1],aList[j] print("List after sorting:",aList) Share Get link Facebook X Pinterest Email Other Apps Labels Practical File Program Python Share Get link Facebook X Pinterest Email Other Apps Comments
Write a python program to check upper and lower case letters in a string. February 08, 2020 Read more
Write a python program to implement a stack and queue using a list data-structure. February 08, 2020 Read more
Write a program to remove all the lines that contain the character ‘a’ in a file and write it to another file. February 08, 2020 Read more
Comments
Post a Comment