fork download
  1. def xyz(a):
  2. n=len(a)
  3. for i in range(n-1):
  4. for j in range(0,n-i-1):
  5. if a[j]> a[j+1]:
  6. a[j],a[j+1]=a[j+1],a[j]
  7. n=[64,34,25,12,22,11,90]
  8. xyz(n)
  9. print("sorted array")
  10. print(n)
Success #stdin #stdout 0.03s 9548KB
stdin
Standard input is empty
stdout
sorted array
[11, 12, 22, 25, 34, 64, 90]