-
Notifications
You must be signed in to change notification settings - Fork 38
/
Index.outline
1 lines (1 loc) · 12.2 KB
/
Index.outline
1
<ul><li><a class="l" href="#pf8" data-dest-detail='[8,"XYZ",72,769.89,null]'>Python 介绍</a><ul><li><a class="l" href="#pf8" data-dest-detail='[8,"XYZ",72,170.61,null]'>使用示例代码</a></li><li><a class="l" href="#pf9" data-dest-detail='[9,"XYZ",72,636,null]'>安装和练习的注意事项</a><ul><li><a class="l" href="#pf9" data-dest-detail='[9,"XYZ",72,548.91,null]'>Python 2 还是 Python 3</a></li><li><a class="l" href="#pf9" data-dest-detail='[9,"XYZ",72,388.35,null]'>使用 Conda 安装</a></li></ul></li><li><a class="l" href="#pfa" data-dest-detail='[10,"XYZ",72,769.89,null]'>Python 之禅</a></li></ul></li><li><a class="l" href="#pfc" data-dest-detail='[12,"XYZ",72,769.89,null]'>如何运行 Python 代码</a><ul><li><a class="l" href="#pfc" data-dest-detail='[12,"XYZ",72,536.94,null]'>Python 解释器</a></li><li><a class="l" href="#pfc" data-dest-detail='[12,"XYZ",72,186.77,null]'>IPython 解释器</a></li><li><a class="l" href="#pfd" data-dest-detail='[13,"XYZ",72,334.93,null]'>自包含 Python 脚本</a></li><li><a class="l" href="#pfe" data-dest-detail='[14,"XYZ",72,741.07,null]'>Jupyter Notebook</a></li></ul></li><li><a class="l" href="#pf10" data-dest-detail='[16,"XYZ",72,769.89,null]'>Python 语法速览</a><ul><li><a class="l" href="#pf10" data-dest-detail='[16,"XYZ",72,118.47,null]'>用 # 标记注释</a></li><li><a class="l" href="#pf11" data-dest-detail='[17,"XYZ",72,595.21,null]'>用换行符结束语句</a></li><li><a class="l" href="#pf11" data-dest-detail='[17,"XYZ",72,274.02,null]'>用分号结束语句</a></li><li><a class="l" href="#pf12" data-dest-detail='[18,"XYZ",72,769.89,null]'>缩进:空白字符有意义</a></li><li><a class="l" href="#pf13" data-dest-detail='[19,"XYZ",72,769.89,null]'>行内空白字符无意义</a></li><li><a class="l" href="#pf13" data-dest-detail='[19,"XYZ",72,438.32,null]'>小括号用于表达式分组或函数调用</a></li><li><a class="l" href="#pf14" data-dest-detail='[20,"XYZ",72,275.96,null]'>完成并更进一步</a></li></ul></li><li><a class="l" href="#pf16" data-dest-detail='[22,"XYZ",72,769.89,null]'>基础 Python 语义:变量和对象</a><ul><li><a class="l" href="#pf16" data-dest-detail='[22,"XYZ",72,538.11,null]'>变量是指针</a></li><li><a class="l" href="#pf18" data-dest-detail='[24,"XYZ",72,674.07,null]'>一切皆对象</a></li></ul></li><li><a class="l" href="#pf1a" data-dest-detail='[26,"XYZ",72,769.89,null]'>基础 Python 语法:运算符</a><ul><li><a class="l" href="#pf1a" data-dest-detail='[26,"XYZ",72,569.24,null]'>算术运算符</a></li><li><a class="l" href="#pf1b" data-dest-detail='[27,"XYZ",72,591.95,null]'>位运算符</a></li><li><a class="l" href="#pf1c" data-dest-detail='[28,"XYZ",72,625.31,null]'>赋值运算符</a></li><li><a class="l" href="#pf1d" data-dest-detail='[29,"XYZ",72,724.81,null]'>比较运算符</a></li><li><a class="l" href="#pf1e" data-dest-detail='[30,"XYZ",72,692.72,null]'>布尔运算符</a></li><li><a class="l" href="#pf1e" data-dest-detail='[30,"XYZ",72,147.69,null]'>身份和成员运算符</a><ul><li><a class="l" href="#pf1f" data-dest-detail='[31,"XYZ",72,660.33,null]'>身份运算符</a></li><li><a class="l" href="#pf1f" data-dest-detail='[31,"XYZ",72,127.42,null]'>成员运算符</a></li></ul></li></ul></li><li><a class="l" href="#pf22" data-dest-detail='[34,"XYZ",72,769.89,null]'>内置类型:简单变量类型</a><ul><li><a class="l" href="#pf22" data-dest-detail='[34,"XYZ",72,383.64,null]'>整数</a></li><li><a class="l" href="#pf23" data-dest-detail='[35,"XYZ",72,450.69,null]'>浮点数</a><ul><li><a class="l" href="#pf24" data-dest-detail='[36,"XYZ",72,769.89,null]'>浮点数精度</a></li></ul></li><li><a class="l" href="#pf25" data-dest-detail='[37,"XYZ",72,769.89,null]'>复数</a></li><li><a class="l" href="#pf25" data-dest-detail='[37,"XYZ",72,202.48,null]'>字符串类型</a></li><li><a class="l" href="#pf26" data-dest-detail='[38,"XYZ",72,240.42,null]'>None 类型</a></li><li><a class="l" href="#pf27" data-dest-detail='[39,"XYZ",72,584.17,null]'>布尔类型</a></li></ul></li><li><a class="l" href="#pf2a" data-dest-detail='[42,"XYZ",72,769.89,null]'>内置数据结构</a><ul><li><a class="l" href="#pf2a" data-dest-detail='[42,"XYZ",72,435.51,null]'>列表</a><ul><li><a class="l" href="#pf2b" data-dest-detail='[43,"XYZ",72,399.91,null]'>列表索引与切片</a></li></ul></li><li><a class="l" href="#pf2d" data-dest-detail='[45,"XYZ",72,285.64,null]'>元组</a></li><li><a class="l" href="#pf2f" data-dest-detail='[47,"XYZ",72,530.2,null]'>字典</a></li><li><a class="l" href="#pf30" data-dest-detail='[48,"XYZ",72,769.89,null]'>集合</a></li><li><a class="l" href="#pf30" data-dest-detail='[48,"XYZ",72,150.69,null]'>其他专用数据结构</a></li></ul></li><li><a class="l" href="#pf32" data-dest-detail='[50,"XYZ",72,769.89,null]'>控制流</a><ul><li><a class="l" href="#pf32" data-dest-detail='[50,"XYZ",72,528.9,null]'>条件语句:if-elif-else</a></li><li><a class="l" href="#pf32" data-dest-detail='[50,"XYZ",72,138.4,null]'>for 循环</a></li><li><a class="l" href="#pf33" data-dest-detail='[51,"XYZ",72,233.5,null]'>while 循环</a></li><li><a class="l" href="#pf34" data-dest-detail='[52,"XYZ",72,741.54,null]'>调整循环执行:break 和 continue</a></li><li><a class="l" href="#pf34" data-dest-detail='[52,"XYZ",72,151.7,null]'>带有 else 块的循环</a></li></ul></li><li><a class="l" href="#pf36" data-dest-detail='[54,"XYZ",72,769.89,null]'>定义和使用函数</a><ul><li><a class="l" href="#pf36" data-dest-detail='[54,"XYZ",72,553.69,null]'>使用函数</a></li><li><a class="l" href="#pf36" data-dest-detail='[54,"XYZ",72,179.68,null]'>定义函数</a></li><li><a class="l" href="#pf37" data-dest-detail='[55,"XYZ",72,358.1,null]'>默认参数</a></li><li><a class="l" href="#pf38" data-dest-detail='[56,"XYZ",72,586.65,null]'>可变参数:*args 和 **kwargs</a></li><li><a class="l" href="#pf39" data-dest-detail='[57,"XYZ",72,769.89,null]'>匿名(Lambda)函数</a></li></ul></li><li><a class="l" href="#pf3c" data-dest-detail='[60,"XYZ",72,769.89,null]'>错误和异常</a><ul><li><a class="l" href="#pf3c" data-dest-detail='[60,"XYZ",72,434.55,null]'>运行时错误</a></li><li><a class="l" href="#pf3e" data-dest-detail='[62,"XYZ",72,769.89,null]'>捕获异常:try 和 except</a></li><li><a class="l" href="#pf40" data-dest-detail='[64,"XYZ",72,769.89,null]'>抛出异常:raise</a></li><li><a class="l" href="#pf41" data-dest-detail='[65,"XYZ",72,210.31,null]'>深入探究异常</a><ul><li><a class="l" href="#pf41" data-dest-detail='[65,"XYZ",72,127.42,null]'>访问错误信息</a></li><li><a class="l" href="#pf42" data-dest-detail='[66,"XYZ",72,580.1,null]'>定义自定义异常</a></li></ul></li><li><a class="l" href="#pf43" data-dest-detail='[67,"XYZ",72,741.07,null]'>try...except...else...finally</a></li></ul></li><li><a class="l" href="#pf44" data-dest-detail='[68,"XYZ",72,769.89,null]'>迭代器</a><ul><li><a class="l" href="#pf44" data-dest-detail='[68,"XYZ",72,423.75,null]'>遍历列表</a></li><li><a class="l" href="#pf45" data-dest-detail='[69,"XYZ",72,480.69,null]'>不总是列表的列表:range()</a></li><li><a class="l" href="#pf46" data-dest-detail='[70,"XYZ",72,371.13,null]'>实用迭代器介绍</a><ul><li><a class="l" href="#pf46" data-dest-detail='[70,"XYZ",72,290.39,null]'>enumerate</a></li><li><a class="l" href="#pf47" data-dest-detail='[71,"XYZ",72,548.89,null]'>zip</a></li><li><a class="l" href="#pf47" data-dest-detail='[71,"XYZ",72,236.57,null]'>map 和 filter</a></li><li><a class="l" href="#pf48" data-dest-detail='[72,"XYZ",72,511.6,null]'>迭代器作为函数参数</a></li></ul></li><li><a class="l" href="#pf49" data-dest-detail='[73,"XYZ",72,622.16,null]'>专用迭代器:itertools</a></li></ul></li><li><a class="l" href="#pf4a" data-dest-detail='[74,"XYZ",72,769.89,null]'>列表推导</a><ul><li><a class="l" href="#pf4a" data-dest-detail='[74,"XYZ",72,457.08,null]'>基础列表推导</a></li><li><a class="l" href="#pf4b" data-dest-detail='[75,"XYZ",72,769.89,null]'>多重迭代</a></li><li><a class="l" href="#pf4b" data-dest-detail='[75,"XYZ",72,558.94,null]'>条件控制迭代</a></li><li><a class="l" href="#pf4b" data-dest-detail='[75,"XYZ",72,175.88,null]'>条件控制值</a></li></ul></li><li><a class="l" href="#pf4e" data-dest-detail='[78,"XYZ",72,769.89,null]'>生成器</a><ul><li><a class="l" href="#pf4e" data-dest-detail='[78,"XYZ",72,583.79,null]'>生成器表达式</a><ul><li><a class="l" href="#pf4e" data-dest-detail='[78,"XYZ",72,502.68,null]'>列表推导使用方括号,而生成器表达式使用圆括号</a></li><li><a class="l" href="#pf4e" data-dest-detail='[78,"XYZ",72,145.28,null]'>列表是值的集合,而生成器是生成值的方法</a></li><li><a class="l" href="#pf50" data-dest-detail='[80,"XYZ",72,769.89,null]'>列表可以被迭代多次,而生成器表达式是一次性的</a></li></ul></li><li><a class="l" href="#pf51" data-dest-detail='[81,"XYZ",72,769.89,null]'>生成器函数:使用关键字 yield</a></li><li><a class="l" href="#pf51" data-dest-detail='[81,"XYZ",72,153.5,null]'>案例学习:素数生成器</a></li></ul></li><li><a class="l" href="#pf54" data-dest-detail='[84,"XYZ",72,769.89,null]'>模块和包</a><ul><li><a class="l" href="#pf54" data-dest-detail='[84,"XYZ",72,549.63,null]'>导入模块:import 语句</a><ul><li><a class="l" href="#pf54" data-dest-detail='[84,"XYZ",72,464.72,null]'>显式模块导入</a></li><li><a class="l" href="#pf54" data-dest-detail='[84,"XYZ",72,285.19,null]'>显式模块导入并取别名</a></li><li><a class="l" href="#pf55" data-dest-detail='[85,"XYZ",72,769.89,null]'>显式导入模块内容</a></li><li><a class="l" href="#pf55" data-dest-detail='[85,"XYZ",72,607.99,null]'>隐式导入模块内容</a></li></ul></li><li><a class="l" href="#pf56" data-dest-detail='[86,"XYZ",72,581.32,null]'>导入 Python 标准库</a></li><li><a class="l" href="#pf56" data-dest-detail='[86,"XYZ",72,305.69,null]'>导入第三方模块</a></li></ul></li><li><a class="l" href="#pf58" data-dest-detail='[88,"XYZ",72,769.89,null]'>字符串处理和正则表达式</a><ul><li><a class="l" href="#pf58" data-dest-detail='[88,"XYZ",72,273.01,null]'>Python 简易字符串操作</a><ul><li><a class="l" href="#pf58" data-dest-detail='[88,"XYZ",72,161.69,null]'>字符串格式化:大小写转换</a></li><li><a class="l" href="#pf59" data-dest-detail='[89,"XYZ",72,334.76,null]'>格式化字符串:添加和删除空格</a></li><li><a class="l" href="#pf5b" data-dest-detail='[91,"XYZ",72,769.89,null]'>查找和替换子字符串</a></li><li><a class="l" href="#pf5c" data-dest-detail='[92,"XYZ",72,366,null]'>拆分和分割字符串</a></li></ul></li><li><a class="l" href="#pf5d" data-dest-detail='[93,"XYZ",72,282.06,null]'>格式化字符串</a></li><li><a class="l" href="#pf5f" data-dest-detail='[95,"XYZ",72,769.89,null]'>使用正则表达式灵活地匹配字符串模式</a><ul><li><a class="l" href="#pf60" data-dest-detail='[96,"XYZ",72,176.53,null]'>一个更复杂的例子</a></li><li><a class="l" href="#pf61" data-dest-detail='[97,"XYZ",72,272.91,null]'>正则表达式语法基础</a></li><li><a class="l" href="#pf65" data-dest-detail='[101,"XYZ",72,546.13,null]'>关于正则表达式的更多资源</a></li></ul></li></ul></li><li><a class="l" href="#pf66" data-dest-detail='[102,"XYZ",72,769.89,null]'>数据科学工具概览</a><ul><li><a class="l" href="#pf66" data-dest-detail='[102,"XYZ",72,492.28,null]'>NumPy:Python 数值计算</a></li><li><a class="l" href="#pf68" data-dest-detail='[104,"XYZ",72,769.89,null]'>Pandas:标签化的面向行数据存储</a></li><li><a class="l" href="#pf69" data-dest-detail='[105,"XYZ",72,413.5,null]'>Matplotlib:MatLab 风格的科学可视化</a></li><li><a class="l" href="#pf6a" data-dest-detail='[106,"XYZ",72,490.64,null]'>SciPy:Python 科学计算</a></li><li><a class="l" href="#pf6b" data-dest-detail='[107,"XYZ",72,428.69,null]'>其他数据科学库</a></li></ul></li><li><a class="l" href="#pf6c" data-dest-detail='[108,"XYZ",72,769.89,null]'>更多学习资源</a></li><li><a class="l" href="#pf6e" data-dest-detail='[110,"XYZ",72,769.89,null]'>附录:插图代码</a><ul><li><a class="l" href="#pf6e" data-dest-detail='[110,"XYZ",72,493.2,null]'>第 7 章:列表索引</a></li></ul></li><li><a class="l" href="#pf70" data-dest-detail='[112,"XYZ",72,769.89,null]'>中英文术语对照表</a></li></ul>