本文實例講述了python中查看變量內存地址的方法。分享給大家供大家參考。具體實現方法如下:
這里可以使用id
>>> print id.__doc__id(object) -> integerReturn the identity of an object. This is guaranteed to be unique amongsimultaneously existing objects. (Hint: it's the object's memory address.)>>>
希望本文所述對大家的Python程序設計有所幫助。
新聞熱點
疑難解答