Skip to content

Instantly share code, notes, and snippets.

@vinay13
Last active August 20, 2016 23:19
Show Gist options
  • Save vinay13/f7ae17132f091346b86e57bfa8524ccf to your computer and use it in GitHub Desktop.
Save vinay13/f7ae17132f091346b86e57bfa8524ccf to your computer and use it in GitHub Desktop.
#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