摘要: ![](https://img2022.cnblogs.com/blog/2738901/202204/2738901-20220427002737708-972758361.png) 阅读全文
posted @ 2022-04-27 00:28 a-tao必须奥利给 阅读(34) 评论(0) 推荐(0)
摘要: ![](https://img2022.cnblogs.com/blog/2738901/202204/2738901-20220426125936226-1894290652.png) 阅读全文
posted @ 2022-04-26 13:00 a-tao必须奥利给 阅读(44) 评论(0) 推荐(0)
摘要: ![](https://img2022.cnblogs.com/blog/2738901/202204/2738901-20220425140255896-331621773.png) 阅读全文
posted @ 2022-04-25 14:03 a-tao必须奥利给 阅读(39) 评论(0) 推荐(0)
摘要: ![](https://img2022.cnblogs.com/blog/2738901/202204/2738901-20220423233139588-820615745.png) 阅读全文
posted @ 2022-04-23 23:32 a-tao必须奥利给 阅读(31) 评论(0) 推荐(0)
摘要: ![](https://img2022.cnblogs.com/blog/2738901/202204/2738901-20220423120847720-1162315217.png) 阅读全文
posted @ 2022-04-23 12:10 a-tao必须奥利给 阅读(68) 评论(0) 推荐(0)
摘要: ![](https://img2022.cnblogs.com/blog/2738901/202204/2738901-20220423094115977-18075264.png) 阅读全文
posted @ 2022-04-23 09:43 a-tao必须奥利给 阅读(41) 评论(0) 推荐(0)
摘要: 导入numpy包进行科学计算 直接上代码 import numpy as np #使用numpy得到一个二维矩阵 a = np.array([1,2,3]) print(a,type(a)) # [1 2 3] <class 'numpy.ndarray'> a1 = np.array([[1,2, 阅读全文
posted @ 2022-04-21 00:10 a-tao必须奥利给 阅读(56) 评论(0) 推荐(0)
摘要: 异常 python异常类层级 不小心会翻车的异常种类 1.语法错误 path = 'a.txt SyntaxError: EOL while scanning string literal 2.缩进错误 python中缩进规则严格:规定默认4个空格表示一个缩进 缩进错误 list1 = [1,2,3 阅读全文
posted @ 2022-04-21 00:05 a-tao必须奥利给 阅读(61) 评论(0) 推荐(0)
摘要: python 中的模块(类) Demo2中的方法 i = 10 # ctrl + alt + l 格式化代码 def a1(): print('这是自己定义的a1方法!') def a2(): print('这是自己定义的a2方法!') 在Demo3中导入Demo2包的方法 #方法一:直接导入Dem 阅读全文
posted @ 2022-04-20 23:48 a-tao必须奥利给 阅读(78) 评论(0) 推荐(0)
摘要: 文件操作 读取文件 1.操作文件的第一种方式(读文件) f = open('a.txt',encoding='utf-8') content = f.read() #<class 'str'> print(content,type(content)) #释放资源 f.close() #释放后调用资源 阅读全文
posted @ 2022-04-19 08:21 a-tao必须奥利给 阅读(48) 评论(0) 推荐(0)