Skip to content

Instantly share code, notes, and snippets.

@chingovan
Created July 9, 2015 15:50
Show Gist options
  • Save chingovan/2c73e431bcc2abeccbd5 to your computer and use it in GitHub Desktop.
Save chingovan/2c73e431bcc2abeccbd5 to your computer and use it in GitHub Desktop.
a=[3, 6, 9, 2, 6, 8, 9, 1, 7, 21, 7, 12]
for i in range(0, len(a)-1):
for j in range(i, len(a)):
if a[i] > a[j]:
t = a[i];
a[i] = a[j];
a[j] = t;
print(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment