会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
刘岗
博客园
首页
新随笔
联系
订阅
管理
2019年7月11日
Linux基础
摘要: Linux
阅读全文
posted @ 2019-07-11 18:00 刘岗
阅读(60)
评论(0)
推荐(0)
2019年3月4日
鞍山市
摘要: from threading import Thread,Lockimport os,timedef work(lock): global n with lock: temp=n time.sleep(0.1) n=temp-1 n=temp-1if __name__ == '__main__':
阅读全文
posted @ 2019-03-04 21:20 刘岗
阅读(162)
评论(0)
推荐(0)
2019年1月16日
函数
摘要: 函数 形参:定义的函数; 实参:调用的函数,与形参一一对应; 传参:实参到形参的过程; return:函数的返回值 return返回的是调用者的值,即func()=1 ;
阅读全文
posted @ 2019-01-16 20:01 刘岗
阅读(107)
评论(0)
推荐(0)
2019年1月10日
is和==,深浅拷贝
摘要: 深浅拷贝: li = [1,2,3,4,[5,6,7]] # 浅拷贝只拷贝一层元素 lst = li.copy() print(li) print(lst) 对于复杂对象(嵌套)list =[1,2,3,[4,5,6]] copy只能copy主对象,对于子对象copy等同于赋值(或理解为引用)
阅读全文
posted @ 2019-01-10 21:31 刘岗
阅读(129)
评论(0)
推荐(0)
2018年12月29日
Python基础知识点
摘要: 字符串:s1 = 'Alex's1 = s.capitalize() # 首字母大写s2 = s.upper() # 全部大写s3 = s.lower() # 全部小写print(s.count('L')) # 返回的是数量print(s.endswith('x')) # 以什么结尾print(s.
阅读全文
posted @ 2018-12-29 15:48 刘岗
阅读(154)
评论(0)
推荐(0)
公告