随笔分类 -  Python

摘要:lst=[3,8,2,7]print(lst)for i in range(len(lst)): for j in range(len(lst)-1-i): if lst[j]>lst[j+1]: tmp=lst[j] lst[j]=lst[j+1] lst[j+1]=tmpprint(lst) 阅读全文
posted @ 2020-04-14 09:44 techNote 阅读(161) 评论(0) 推荐(0)