随笔分类 -  Python

学习笔记
摘要:数据再运算 a = range(0,15) b = [_**2 for _ in a] c = [str(_) for _ in a] print(b) print(c) output: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 阅读全文
posted @ 2021-07-04 16:09 PiaYie 阅读(68) 评论(0) 推荐(0) 编辑
摘要:NumPy 简单介绍一下数值计算库numpy, 主要用来存储和计算矩阵。https://numpy.org/ 主要功能包括: N 维数组对象 Array(最基本的数据结构) 成熟的广播机制 能够解决线性代数、随机数生成数相关问题 import numpy as np import numpy.lin 阅读全文
posted @ 2021-07-04 14:54 PiaYie 阅读(93) 评论(0) 推荐(0) 编辑
摘要:python的IDE(Integrated Development Environment 集成开发环境) 例如PyCharm,但它本身无法执行python代码,执行代码是由python解释器负责。即python的不同版本,可以在官网下载。 Anaconda:组装 Python 常用包和环境在一起, 阅读全文
posted @ 2021-07-03 13:27 PiaYie 阅读(78) 评论(0) 推荐(0) 编辑
摘要:掌握 时间戳↔时间数组↔时间字符串 的转化。 我们在写程序时可能用到记录时间的地方,例如: 日志管理必然会记录时间 统计程序执行开始、结束时间 测试一个函数执行时长 python中与时间相关的模块:time && datetime time模块表达时间的方法 设定一个零点作为基准(初始时间),偏移长 阅读全文
posted @ 2021-07-03 11:50 PiaYie 阅读(37) 评论(0) 推荐(0) 编辑
摘要:python中常用的文件读写,压缩加密文件等 阅读全文
posted @ 2021-02-22 20:55 PiaYie 阅读(122) 评论(0) 推荐(0) 编辑
摘要:正则表达式 阅读全文
posted @ 2021-01-19 15:46 PiaYie 阅读(145) 评论(0) 推荐(0) 编辑
摘要:c++中面向对象的编程思想在python中可以很好的类比。 下面将介绍Python中类型创建、管理自定义类的相关内置函数。 函数作用域问题 在写程序的时候,我们会定义各种变量、全局变量、局部变量等,Python中查找变量的顺序遵循LEGB规则,即当遇到每个变量时,python解释器: 优先从它所属的 阅读全文
posted @ 2021-01-13 18:12 PiaYie 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Python标准库 https://docs.python.org/zh-cn/3/library/ 关于官方文档的介绍函数的说明,像 即max的函数原型为: max(iterable,*[, key, default])max(arg1, arg2, *args[, key]) 啥意思? 注意了! 阅读全文
posted @ 2021-01-12 19:49 PiaYie 阅读(149) 评论(0) 推荐(0) 编辑
摘要:key 函数一般会与 lambda 匿名函数结合使用。要区分逻辑上合并字典,与普通的合并字典,有什么不一样 阅读全文
posted @ 2021-01-10 19:25 PiaYie 阅读(88) 评论(0) 推荐(0) 编辑
摘要:切片操作、key 函数、zip 连接等 ,PyEcharts 绘图 阅读全文
posted @ 2020-09-29 10:45 PiaYie 阅读(197) 评论(0) 推荐(0) 编辑
摘要:列表的基本操作,深、浅拷贝,常见切片操作、元组(tuple)的基本操作、可变对象,不可变对象 阅读全文
posted @ 2020-09-24 19:48 PiaYie 阅读(318) 评论(0) 推荐(0) 编辑
摘要:Python 的四大基本数据类型。数值型 int、float 等;容器型 list、dict、tuple、set 等;字符型 str 与正则表达式介绍;自定义类的基本语法规则,class、属性和方法 阅读全文
posted @ 2020-09-22 23:50 PiaYie 阅读(499) 评论(0) 推荐(0) 编辑
摘要:Python 两大特征、四大基本语法,总结了 Python 的命名规则、缩进原则、特殊关键字、特殊运算符 阅读全文
posted @ 2020-09-22 21:54 PiaYie 阅读(168) 评论(0) 推荐(0) 编辑
摘要:BONUS 阅读全文
posted @ 2020-08-15 14:38 PiaYie 阅读(192) 评论(0) 推荐(0) 编辑
摘要:detectEnglish.isEnglish(someString) # returns True or False 阅读全文
posted @ 2020-08-10 21:45 PiaYie 阅读(598) 评论(0) 推荐(0) 编辑
摘要:python书写风格 阅读全文
posted @ 2020-08-10 20:07 PiaYie 阅读(163) 评论(0) 推荐(0) 编辑
摘要:python中的列表、集合 阅读全文
posted @ 2020-08-10 20:06 PiaYie 阅读(185) 评论(0) 推荐(0) 编辑
摘要:python中的字典 阅读全文
posted @ 2020-08-10 17:09 PiaYie 阅读(652) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示