95.5k views
4 votes
In Python

Write the special method __str__() for CarRecord.

Sample output with input: 2009 'ABC321'
Year: 2009, VIN: ABC321

User Pencroff
by
4.0k points

1 Answer

2 votes

Answer:

def __str__(self):

return ('Year: %d, VIN: %s' %(self.year_made, self.car_vin))

Step-by-step explanation:

Here you go! This should do it.

User HilaD
by
4.1k points