s = [5,2,7,4,0,9,8,6] 
n = 1 
while n < len(s):
     for i in range(len(s)-n):
        if s[i] > s[i+1]:
           s[i],s[i+1] = s[i+1],s[i]
     n += 1
print(s)


 Похожие публикации
2019-02-06 • Просмотров [ 38 ]