代码示例:(标识:python_ref_id)
python_ref_id.py
x = ('apple', 'banana', 'cherry')
y = id(x)
print(y)

# This value is the memory address of the object and will be different every time you run the program
运行结果: