Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- li=[1,4,2,5,13,7]
- n=1
- while n<len(li):
- for i in range(0,len(li)-n):
- if li[i]<li[i+1]:
- li[i],li[i+1]=li[i+1],li[i]
- n+=1
- print(li)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement