#coding=utf-8 #内部类 class MyClass(object): class InnerClass: pass # 正则表达式 # 通过re模块来访问 import re m=re.search(r'foo','seafood') print m m.group() print m m=re.search(r'bar','seafood') print m…
1.冒泡排序 lis = [56,12,1,8,354,10,100,34,56,7,23,456,234,-58] def sortport(): for i in range(len(lis)-1): for j in range(len(lis)-1-i): if lis[j]>lis[j+1]: lis[j],lis[j+1] = lis[j+1],lis[j] return lisif __name__ ==…