I have a function where I pass an object from the Car column or an object from the Plane column.
In this function, I’d like to do slightly different things depending on what column it came from. Essentially, I’d like to say something like
if object.is_car:
# do something
elif object.is_plane:
# do something else
What’s the best way to do this? I’m sure it’s simple and I’m missing it.
isinstance()