Well, I created this class (Car class), then set the values for each argument of that class. But when printing the variable with the already defined values, this appears:
#isso é o que aparece ao imprimir a variável car1
<Car object at 0x7fa71d52fb10>
class Car(object):
condition = "new"
def __init__(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg
def display_car(self):
print("This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg))
def drive_car(self):
self.condition = "used"
car1 = Car('Monza', 'marron', 55)
print(car1)#É ESSA variável que, ao ser imprimida, imprime aquele valor estranho.
Just curious, I'd like to know why.
NOTE: Remembering that I am a self-taught student in programming, so have a little more patience, okay?
From now on I thank you for the collaboration of vcs, valew galera!