05 2018 档案

摘要:1 num=[1,2,5,9,8] 2 def add(x):#lambda x:x+1 3 return x+1 4 def sub(x):#lambda x:x-1 5 return x-1 6 def squ(x):#lambda x:x**2 7 return x**2 8 def map_test(func,x): 9 array =... 阅读全文
posted @ 2018-05-21 22:24 容颜-gl 阅读(608) 评论(0) 推荐(0)
摘要:递归特性: 1:必须有明确的出口 2:每次进入更深一层递归 问题规模减小 3:递归效率不高 层次过多会导致栈溢出 阅读全文
posted @ 2018-05-19 15:15 容颜-gl 阅读(91) 评论(0) 推荐(0)
摘要:函数即变量: 阅读全文
posted @ 2018-05-18 23:35 容颜-gl 阅读(132) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-05-18 20:31 容颜-gl 阅读(262) 评论(0) 推荐(0)
摘要:运行结果:ccc ccc 注:如果函数的内容中无global关键字,优先读取局部变量并且能读取全局变量 无法给全局变量重新赋值 name=‘hhh’ 但是对于可变类型(不可变类型:数字 字符串 元组;列表、字典可变),可以对内部元素进行操作 如果函数中有global关键字,此变量本质上就是全局变量, 阅读全文
posted @ 2018-05-18 16:48 容颜-gl 阅读(302) 评论(0) 推荐(0)
摘要:cmd中: pip install SomePackage//安装SomePackage模块 pip list//列出当前安装所有模块 pip install-upgrade SomePackage//升级SomePackage模块 pip uninstallSomePackage//卸载SomeP 阅读全文
posted @ 2018-05-18 16:17 容颜-gl 阅读(136) 评论(0) 推荐(0)
摘要:su root //切换到根用户 密码输入 useradd(参数后面学) 用户名 //添加用户 passwd 用户名 //设置更改(新)用户密码 new password: Retype new password: //更改root密码 passwd root new password: Retyp 阅读全文
posted @ 2018-05-10 20:54 容颜-gl 阅读(274) 评论(0) 推荐(0)