Last active
August 20, 2016 23:19
-
-
Save vinay13/f7ae17132f091346b86e57bfa8524ccf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#usr/bin/python | |
li = [5,2,3,1,6,4] | |
for k in range(0,len(li)-1): | |
j=1 | |
for i in range(0,len(li)): | |
if li[i] > li[j]: | |
li[i],li[j] = li[j],li[i] | |
if j == len(li)-1: | |
pass | |
else: | |
j = j+1 | |
else: | |
if j == len(li)-1: | |
pass | |
else: | |
j = j + 1 | |
print li |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment