Class and Object

How can i print the two objects below in the loop?

for v in [maditsi_car, maditsi_aero]:
    #print(f"{*object*} is a {v.make} {v.model} ") 
    v.get_make_model()
    v.action()
1 Like

You’re correct to use print() but you need to remove the # to un-comment the line.

My question is what do i put in place of {???} to be able to print the object names. The comment is there because the code gives an error…

What’s the error?

Share as much information as possible. It’s impossible to solve an error if you don’t share it. You may also need to share more code, can’t see the structure of the objects here.

is that object an instance of a class? if yes then object.__class__.__name__ is the name of the class