1n = int(input("Elementos da lista = "))
2lista = []
3
4for i in range(n):
5 x = int(input("Valor (0 a 9) = "))
6 if (i == 0) or (x > lista[- 1]):
7 lista.append(x)
8 else:
9 pos = 0
10 while (pos < len(lista)):
11 if x <= lista[pos]:
12 lista.insert(pos , x)
13 break
14 pos = pos + 1
1number=[1,5,6,9,0]
2for i in range(len(number)):
3 for j in range(i+1,len(number)):
4 if number[i]<number[j]:
5 number[i],number[j]=number[j],number[i]
6print(number)