
Python自学
文章平均质量分 70
关于Python自学相关的
lee_824
这个作者很懒,什么都没留下…
展开
-
Python(自学笔记3--数据可视化与使用API)
十、数据可视化 先安装matplotlib包 安装后,可以输入import matplotlib来测试是否安装成功 测试: import matplotlib.pyplot as plt s = [1, 4, 9, 16, 25] plt.plot(s) plt.show() 先导入模块pyplot,指定别名为plt 定义列表s将列表传递给函数plot plt.show()打开matplotlib查看器,先是绘制的图形 设置格式 import matplotlib.pyplot as plt s =原创 2021-03-16 15:05:11 · 268 阅读 · 1 评论 -
Python(自学笔记2)
六、if and相当于与,or相当于或,不等为!= 包含为 in 不包含为not in 七、字典 在python中字典为键-值对应,每个键都与一个值相关联,可以使用键来访问与之相关联的值 访问字典值:字典名+方括号内的键 people = { 'height': '180', 'weight': '150', 'country': 'China', } print(people['height']) print(people['weight']) 其是动态结构,可以动态添加键值原创 2021-03-14 16:16:07 · 176 阅读 · 1 评论 -
Python(自学笔记1)
文章目录字符串列表 字符串 # ####################### python 自学笔记 ###################### print("this is my first python"); print("hello world"); message="this is lee zhuo" example='this is an example' print(example) print(message) # 字符串大小写转换 name = "lee" print(name原创 2021-03-01 15:31:33 · 262 阅读 · 2 评论