📜  使用类构造函数创建对象 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:20.701000             🧑  作者: Mango

代码示例1
class Employee:
                def __init__(self, name):
                                self.name = name

E1=Employee("Employee name1")
print(E1.name)