![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
致宁
不安于现状才能不断努力
展开
-
Python中的类与对象
一、定义类 class 类名: 类内容(包括属性、函数) 二、类里面的函数 1. 类函数 是指不需要创建类对象实例,就可以调用的函数 在函数前加@classmethod标识 class Student: name='hx' age = 12 @classmethod def classmethod(cls): print(...原创 2020-02-06 16:00:54 · 136 阅读 · 0 评论 -
python3六个基本数据类型
摘取Python3教程:https://www.runoob.com/python3/python3-data-type.html Python3 中有六个标准的数据类型: Number(数字) String(字符串) List(列表) Tuple(元组) Set(集合) Dictionary(字典) Python3 的六个标准数据类型中: 不可变数据(3 个):Number(数字)、Stri...原创 2020-02-04 15:40:35 · 676 阅读 · 0 评论 -
Python中的序列
视频资源:B站小甲鱼视频 博客参考:https://www.cnblogs.com/forwardfeilds/p/10451794.html Python的序列类型非常丰富,包括了列表(list),元组(tuple),字符串(str), 字节数组(bytes),队列(deque) 能否存放不同类型数据 容器序列:能存放不同类型的数据。存放的一般是引用。list、tuple、collectio...原创 2020-01-31 16:47:45 · 282 阅读 · 0 评论