Sorry, if the title seemed a little imprecise.
I'm wondering if there is way of making sure that every instance of an object can have a unique serial number?
class Airplane:
def __init__(self, name, passenger_hold):
self.name = name
self.passenger_hold = passenger_hold
airplane1 = Airplane("Airbus A320", 100)
airplane2 = Airplane("Boeing 747", 250)
How can I make sure that the first airplane has the serial number 0, the second one 1 and so on?