ID d'objet de liste Python

# assuming obj has an attribute id
list = [obj1, obj2, obj3]

ids = [obj.id for obj in list]
Black Beaver