fork(1) download
  1. # your code goes here
  2. t=[1,10,7,6]
  3. t2=[12,3,6,0]
  4. for j in range (0,len(t)-1):
  5. for i in range(0,len(t)-1):
  6. if t[i]>t[i+1]:
  7. t[i],t[i+1]=t[i+1],t[1]
  8. t2.sort()
  9. print(t)
  10. print(t2)
Success #stdin #stdout 0.07s 7904KB
stdin
Standard input is empty
stdout
[1, 6, 7, 7]
[0, 3, 6, 12]