![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
It ' me
这个作者很懒,什么都没留下…
展开
-
字符串
print(3 and 4)print(3 or 4)number=1print(number + 4 <=12 or number +4 - 12)a=3000print(id(a))b=-3000print(id(b))form sys import getrefcounta=[1,2,3]print(getrefcount(a))b=aprint(getrefcount(a))c=[a,a]print(getrefcount(a))del aprint(“a被销原创 2020-06-26 14:39:43 · 163 阅读 · 0 评论 -
列表元组字典
可变list1=[1,2,3]print(id(list1))list2=[1,2,3]print(id(list2))list3=list1+list2print(id(list3))print(list3*2)print(list1 is list2)print(list1 is not list2)字符串中的and 返回的后面值,or返回前面值并集 1为true,0为false1 and 1 true1 and 0 false0 and 0 flase0 and 1 f原创 2020-06-26 14:38:50 · 128 阅读 · 0 评论 -
python笔记
刘大坑python笔记print(3 and 4)print(3 or 4)number=1print(number + 4 <=12 or number +4 - 12)a=3000print(id(a))b=-3000print(id(b))form sys import getrefcounta=[1,2,3]print(getrefcount(a))b=aprint(getrefcount(a))c=[a,a]print(getrefcount(a))del原创 2020-06-12 09:17:02 · 417 阅读 · 1 评论