Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list = [0,3,2,1,5,7,6]
- def bubble(list):
- last_item = len(list)- 1
- for i in range(0 , last_item):
- for j in range(0 , last_item):
- if list[j] > list[j+1]:
- list[j],list[j+1] = list[j+1],list[j]
- return bubble
- print(bubble)
Add Comment
Please, Sign In to add comment