📜  创建 Python 类 - Python 代码示例

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

代码示例2
class car:
  def __init__(self, model, color):
    self.model = model
    self.color = color
         
tesla = car("model 3", "black")