Facebook
From Wiktor, 4 Years ago, written in Python.
Embed
Download Paste or View Raw
Hits: 220
  1. list = [6,7,2,5,7,9,12,54,7,32,354,2143,765,12,35,57,23,4,6,78]
  2. done = True
  3.  
  4. while done:
  5.     done = False
  6.     for i in range(len(list)-1):
  7.         #done = True
  8.         if list[i] > list[i+1]: list[i],list[i+1]=list[i+1],list[i]
  9.  
  10. print("\nPosortowano: ", list)