摘要:
冒泡排序 def func(alist): for x in range(1,len(alist)): for i in range(0,len(alist)-x): if alist[i] > alist[i+1]: alist[i], alist[i+1] = alist[i+1], alist 阅读全文
摘要:
1.python基础 1.1 列表常用方法 #1. append用于在列表末尾追加新的对象 a = [1,2,3] a.append(4) #the result : [1, 2, 3, 4] #2. count方法统计某个元素在列表中出现的次数 a = ['aa','bb','cc','aa',' 阅读全文