map使用
完整用户名登录,注册
冒泡排序
递归
1 def func(arg1,arg2): 2 if arg1 == 0: 3 print arg1, arg2 4 arg3 = arg1 + arg2 5 print arg3 6 func(arg2, arg3) 7 8 func(0,1) 9 10 demo
装饰器
1 def wrapper(func): 2 def result(): 3 print 'before' 4 func() 5 print 'after' 6 return result 7 8 @wrapper 9 def foo(): 10 print 'foo