摘要: #re正则表达式import re#1通配符(.可匹配出换行符外的任意一个字符.ython-->qython +ython)#2\特殊字符进行转义 Python\\.org或使用原始字符r'Python\.org'#3[]字符集 [pg]ython-->匹配python、gython [a-z]匹配 阅读全文
posted @ 2017-08-16 11:24 喻晓生 阅读(164) 评论(0) 推荐(0) 编辑
摘要: import sys,pprintimport mathimport copypprint.pprint(sys.path)print(dir(copy))#查看模块包含的内容print([n for n in dir(copy) if not n.startswith('_') ])#过滤掉 _xxx_#-------------------------输出结果-----------------... 阅读全文
posted @ 2017-08-15 11:21 喻晓生 阅读(229) 评论(0) 推荐(0) 编辑
摘要: #面向对象:多态、封装、继承#1 多态:意味着即使不知道变量所引用的对象类型是什么,还是能对他进行操作,而且也会根据他的不同类型表现出不同的行为#多态和方法from random import choicex = choice(['Hello World',['1','1','1','2','3'] 阅读全文
posted @ 2017-08-08 08:10 喻晓生 阅读(228) 评论(0) 推荐(0) 编辑
摘要: #抽象:函数"""#1 计算斐波拉契函数fib=[0,1]for i in range(10): fib.append(fib[-2]+fib[-1])print(fib)#2创建函数def fibs(num): '计算前10个斐波拉契数'#文档字符串 result = [0,1] for i in 阅读全文
posted @ 2017-08-04 14:16 喻晓生 阅读(253) 评论(0) 推荐(0) 编辑
摘要: #语句'''#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++##1 为函数提供别名from math import sqrt as Testprint(Test(4))#2 序列解包x,y,z = 1,23,4pri 阅读全文
posted @ 2017-08-04 10:47 喻晓生 阅读(206) 评论(0) 推荐(0) 编辑
摘要: #字典:通过名字引用值得数据结构 键/值from copy import deepcopy#######################################################"""#1 创建和使用字典phone = {"张三":"1234567","lisi":"23414 阅读全文
posted @ 2017-07-31 16:13 喻晓生 阅读(254) 评论(0) 推荐(0) 编辑
摘要: #1字符串:格式化输出、字符串分割、字符串搜索、连接from math import piimport string"""format_test = "2017 %% %s %s %.3f"value = ("hello","world",pi)print(format_test % value)# 阅读全文
posted @ 2017-07-31 11:14 喻晓生 阅读(339) 评论(0) 推荐(0) 编辑
摘要: #通用序列操作:分片、索引、加、乘、成员资格、长度及最值#成员资格pwd = 'dxrw'print('rw' in pwd)user = ['zhangsan','26','123456']database = [ ['zhangsan','1234'], ['lisi','235'], ['wa 阅读全文
posted @ 2017-07-31 09:38 喻晓生 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 1梦想的雨季官网1 http://yuhaitao.iok.la 2梦想的雨季官网2 http://daydayup11.cn 3亚东快递 http://yadong.6655.la 4 梦想的雨季官网3http://www.yuhaitao.win 远程控制添加网址、网站名称、密码()、选择添加到 阅读全文
posted @ 2017-07-12 23:01 喻晓生 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 1 嵌入式特点: A:专用 软硬件可裁剪可配置(嵌入式系统是面向应用的,和通用系统的区别在于系统功能专一) B: 低功耗 高可靠性 高稳定性 C:软件代码短小 和PC资源相比资源(硬件资源内存等)比较少 D:代码可固化在存储器芯片或单片机中而不是存在磁盘中 E:实时性 F:交互性(一般不需要键盘鼠标 阅读全文
posted @ 2016-07-27 10:21 喻晓生 阅读(1229) 评论(0) 推荐(0) 编辑