def __str__(self):
return print("这个地瓜被烤的时间是{},状态是{}".format(self.cook_time, self.cook_state))
Return:
ie: "Type error: returned non-string type"
In the return statement, correct the following to execute normally
def __str__(self):
return "这个地瓜被烤的时间是{},状态是{}".format(self.cook_time, self.cook_state)
In the __str__() method, write the content to be returned directly after return.