vafin20

Untitled

Oct 8th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. list = [0,3,2,1,5,7,6]
  2. def bubble(list):
  3.     last_item = len(list)- 1
  4.     for i in range(0 , last_item):
  5.         for j in range(0 , last_item):
  6.             if list[j] > list[j+1]:
  7.                 list[j],list[j+1] = list[j+1],list[j]
  8.     return bubble
  9. print(bubble)
Add Comment
Please, Sign In to add comment