member variable string gets treated as Tuple in Python

In your __init__, you have:

    self.model = model,
    self.color = color,

which is how you define a tuple. Change the lines to

    self.model = model
    self.color = color

without the comma:

>>> a = 2,
>>> a
(2,)

vs

>>> a = 2
>>> a
2

Leave a Comment