摘要:
1 #方法1 2 #找出字符串中以a开头,以b结尾的所有子串 3 def find_substr(string): 4 result = [] 5 for i,s in enumerate(string): 6 for j,e in enumerate(string): 7 if s == 'a' and e == 'b' a... 阅读全文
摘要:
1 #冒泡排序 2 def buble(data_set): 3 num = len(data_set) 4 for i in range(0,num): 5 for j in range(i+1,num): 6 if data_set[i]>data_set[j]: 7 data_set[j],data_s... 阅读全文