本文参考了以下文章:https://blog.csdn.net/weixin_41950276/article/details/84205588
相信你在使用Python的内置代码库时已经知道什么是类了。所谓类,就是一个类别,这个类别里面有一些代码。
我们今天要学习的就是Python里面的类。
我们怎么来定义一个类呢?我们可以使用Python的内置函数class。
# coding:utf-8
myfile = 'csdn的文章'
class doc:
def __init__(self,cishu=int):