会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
魂~
博客园
首页
新随笔
联系
管理
订阅
随笔分类 -
Python基础
1
2
3
4
5
下一页
python dict操作
摘要:1 d1 = {'one': 1, 'two': 2} 2 d2 = {'one': 1, 'two': 2} 3 d3 = {'one': 1, 'two': 2} 4 print(dir(d1)) 5 6 # 1、contians 7 print('one' in d1) 8 9 # 2、eq 10 print(d1 == d2) 11 12 # 3、len 13 p...
阅读全文
posted @
2018-01-26 14:19
魂~
阅读(311)
评论(0)
推荐(0)
python list操作
摘要:1 # 1、+ 2 list1 = [1, 2, 3, 4] 3 list2 = [5, 6, 7, 8] 4 list3 = [1, 2, 3, 4] 5 6 print(list1 + list2) 7 print(list1) 8 print(list2) 9 10 11 # 2、contains 12 print(1 in list1) 13 14 15 # ...
阅读全文
posted @
2018-01-26 12:30
魂~
阅读(336)
评论(0)
推荐(0)
python 模拟事件触发机制
摘要:EventManager.py test.py
阅读全文
posted @
2018-01-18 22:38
魂~
阅读(3193)
评论(0)
推荐(1)
python 单下划线和双下划线
摘要:1 underline.py 2 __all__ = ['_underline_variable', '__underline_variable', '_underline_func', 3 '__underline_func', '_underline_class', '__underline_class'] 4 5 6 _underline_variab...
阅读全文
posted @
2018-01-13 20:45
魂~
阅读(365)
评论(0)
推荐(0)
python int对象的方法
摘要:1、求绝对值 2、加法 3、按位与 4、求bool值 5、返回数字的上入整数 6、地板除并取模 7、是否相等 8、转float类型 9、数字的下舍整数 10、地板除 11、数据格式化 12、大于等于 13、获取对象的属性 14、__getnewargs__ 15、大于 16、哈希 17、__inde
阅读全文
posted @
2018-01-10 14:33
魂~
阅读(2001)
评论(0)
推荐(0)
python 基本类型的创建方法
摘要:1、int 2、bool 3、float 4、str 5、bytearray 6、bytes 7、list 字典转列表: 8、tuple 字典转元组: 9、dict 10、set 11、frozenset 12、complex 13、type
阅读全文
posted @
2018-01-10 11:21
魂~
阅读(726)
评论(0)
推荐(0)
python __builtins__ zip类 (71)
摘要:71、'zip' , 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表。如果各个迭代器的元素个数不一致,则返回列表长度与最短的对象相同,利用 * 号操作符,可以将元组解压为列表。
阅读全文
posted @
2018-01-10 10:38
魂~
阅读(321)
评论(0)
推荐(0)
python __builtins__ type类 (69)
摘要:69、'type', 返回对象类型
阅读全文
posted @
2018-01-10 10:37
魂~
阅读(346)
评论(0)
推荐(0)
python __builtins__ tuple类 (68)
摘要:68、'tuple', 转换为元组类型
阅读全文
posted @
2018-01-10 10:36
魂~
阅读(273)
评论(0)
推荐(0)
python __builtins__ str类 (65)
摘要:65、'str', 字节转换成字符串。第一个传入参数是要转换的字节,第二个参数是按什么编码转换成字符串
阅读全文
posted @
2018-01-10 10:35
魂~
阅读(506)
评论(0)
推荐(1)
python __builtins__ staticmethod类 (64)
摘要:64、'staticmethod', 返回静态方法
阅读全文
posted @
2018-01-10 10:34
魂~
阅读(251)
评论(0)
推荐(0)
python __builtins__ slice类 (62)
摘要:62、'slice', 对序列化类型数据切片,返回一个新的对象。 class slice(object) | slice(stop) | slice(start, stop[, step]) | | Create a slice object. This is used for extended s
阅读全文
posted @
2018-01-10 10:33
魂~
阅读(232)
评论(0)
推荐(0)
python __builtins__ set类 (60)
摘要:60、'set', 转换为集合类型
阅读全文
posted @
2018-01-10 10:32
魂~
阅读(340)
评论(0)
推荐(0)
python __builtins__ reversed类 (58)
摘要:58、'reversed', 返回一个反转的迭代器。
阅读全文
posted @
2018-01-10 10:31
魂~
阅读(201)
评论(0)
推荐(0)
python __builtins__ range类 (56)
摘要:56、'range', 创建一个整数列表
阅读全文
posted @
2018-01-10 10:30
魂~
阅读(247)
评论(0)
推荐(0)
python __builtins__ property类 (55)
摘要:55、'property', 获取对象的所有属性
阅读全文
posted @
2018-01-10 10:29
魂~
阅读(260)
评论(0)
推荐(0)
python __builtins__ memoryview类 (46)
摘要:46、'memoryview', 返回给定参数的内存查看对象(Momory view)。所谓内存查看对象,是指对支持缓冲区协议的数据进行包装,在不需要复制对象基础上允许Python代码访问。
阅读全文
posted @
2018-01-10 10:26
魂~
阅读(341)
评论(0)
推荐(0)
python __builtins__ list类 (42)
摘要:42、'list', 转换为列表类型
阅读全文
posted @
2018-01-10 10:24
魂~
阅读(351)
评论(0)
推荐(0)
python __builtins__ map类 (44)
摘要:44、'map', 根据提供的函数对指定序列做映射。
阅读全文
posted @
2018-01-10 10:24
魂~
阅读(226)
评论(0)
推荐(0)
python __builtins__ license类 (41)
摘要:41、'license', 许可证,执照
阅读全文
posted @
2018-01-10 10:23
魂~
阅读(307)
评论(0)
推荐(0)
1
2
3
4
5
下一页
公告