📜  python list object ids - Python 代码示例
📅  最后修改于: 2022-03-11 14:45:23.995000             🧑  作者: Mango
代码示例1
# assuming obj has an attribute id
list = [obj1, obj2, obj3]
ids = [obj.id for obj in list]