摘要: 一、计算机基础 1、python简介及入门 2、Python之数据类型 数字类型 字符串 列表 元组 字典 集合 3、python之 字符编码具体原理 4、python 文件操作 5、map函数和reduce函数的区别 6、Python之函数 初始函数 函数嵌套及作用域 装饰器 迭代器和生成器 内置 阅读全文
posted @ 2018-08-11 09:22 MyHans 阅读(135) 评论(0) 推荐(0)
摘要: try: print(abc)except Exception as e: print(e) raise 阅读全文
posted @ 2018-07-28 17:07 MyHans 阅读(73) 评论(0) 推荐(0)
摘要: 1、字符串 查看字符串对象的内置属性: ['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__' 阅读全文
posted @ 2018-07-15 10:36 MyHans 阅读(154) 评论(0) 推荐(0)
摘要: md5加密 import hashlib s = 'day9test' md5_obj = hashlib.md5() md5_obj.update(s.encode('utf-8')) print(md5_obj.hexdigest()) md5_2 = hashlib.md5() md5_2.u 阅读全文
posted @ 2018-07-07 15:51 MyHans 阅读(63) 评论(0) 推荐(0)
摘要: 1、正则表达式中的compile方法 书籍:《正则指引》,它得用python做为介绍 阅读全文
posted @ 2018-07-07 11:26 MyHans 阅读(103) 评论(0) 推荐(0)
摘要: 1、callable callable测试对象是否为加括号可执行,如函数或类。 阅读全文
posted @ 2018-06-30 11:40 MyHans 阅读(98) 评论(0) 推荐(0)
摘要: 1、用模块原因 为了节省内存 2、什么是模块 python代码或者C语言代码 以功能来分类 3、模块分类 内置模块,包含在python解释器内的模块 扩展模块,需要安装 import time for i in range(0,101,2): time.sleep(0.1) char_num = i 阅读全文
posted @ 2018-06-30 10:25 MyHans 阅读(89) 评论(0) 推荐(0)