上一页 1 2 3 4 5 6 7 ··· 14 下一页
摘要: 1 class Operation(): 2 3 def __init__(self, NumberA=0, NumberB=0): 4 self.NumberA = NumberA 5 self.NumberB = NumberB 6 7 def GetResult(self): 8 pass 9 10 ... 阅读全文
posted @ 2018-01-15 16:58 魂~ 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1 class Singleton(object): 2 3 def __new__(cls, *args, **kwargs): 4 if not hasattr(cls, '_the_instance'): 5 cls._the_instance = object.__new__(cls, *args, **kwargs) 6 ... 阅读全文
posted @ 2018-01-15 14:31 魂~ 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 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 魂~ 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 一、单字符匹配 二、表示数量 三、表示边界 四、分组 五、标志 A = <RegexFlag.ASCII: 256> ASCII = <RegexFlag.ASCII: 256> DOTALL = <RegexFlag.DOTALL: 16> I = <RegexFlag.IGNORECASE: 2 阅读全文
posted @ 2018-01-12 15:39 魂~ 阅读(629) 评论(0) 推荐(0) 编辑
摘要: 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 魂~ 阅读(1955) 评论(0) 推荐(0) 编辑
摘要: 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 魂~ 阅读(692) 评论(0) 推荐(0) 编辑
摘要: 71、'zip' , 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表。如果各个迭代器的元素个数不一致,则返回列表长度与最短的对象相同,利用 * 号操作符,可以将元组解压为列表。 阅读全文
posted @ 2018-01-10 10:38 魂~ 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 69、'type', 返回对象类型 阅读全文
posted @ 2018-01-10 10:37 魂~ 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 68、'tuple', 转换为元组类型 阅读全文
posted @ 2018-01-10 10:36 魂~ 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 65、'str', 字节转换成字符串。第一个传入参数是要转换的字节,第二个参数是按什么编码转换成字符串 阅读全文
posted @ 2018-01-10 10:35 魂~ 阅读(469) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 ··· 14 下一页