member variable string gets treated as Tuple in Python

前端 未结 3 1407
星月不相逢
星月不相逢 2020-12-08 17:58

I am currently learning Python with the help of CodeAcademy. My problem may be related to their web application, but my suspicion is I am just wrong on a very fundamental le

3条回答
  •  佛祖请我去吃肉
    2020-12-08 18:44

    yes, you have to remove comma from instance variables. from self.model = model, to self.model = model

    Nice to see, you are using Class variable concept, "condition" is class variable and "self.model", "self.color", "self.mpg" are instance variables.

提交回复
热议问题