Advertisement
Guest User

ordenação de números

a guest
Apr 9th, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. lista = [12,5,7,4,9,99,5,3,23,6,54,7,3,2,8,9]
  2. l = []
  3. k = 0
  4. while len(lista) > 0:
  5.     for x in lista:
  6.         for n in range(0,len(lista)):
  7.             if lista[n] >= x:
  8.                 k += 1
  9.         if k == len(lista):
  10.             l.append(x)
  11.             lista.remove(x)
  12.         k = 0
  13. print(l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement