# Collection of code snippets by Arne Vajhøj 
# (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
def bobblesort(a):
  for i in range(len(a)-1):
    for j in range(i+1,len(a)):
      if a[i] > a[j]:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp

a = [1,3,2,4,0]
print a
bobblesort(a)
print a
