When to use ['id'] or .id in python code example Example: id() python #The id() function returns identity (unique integer) of an object.