方法一 : while 循环
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def bubble(bubbleList):
listLength = len(bubbleList)
while listLength > 0:
for i in range(listLength - 1):
if bubbleList[i] > bubbleList[i+1]:
...
5-11 3,483 views
方法一 : while 循环
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def bubble(bubbleList):
listLength = len(bubbleList)
while listLength &g...