id() is use to access memory address of an object in Python.
Code :
StringOne = "www.codetheta.com"
print ("Memory address is:" ,id(StringOne))
Output :
Memory address is: 45121072
IDE Used To Test This Code : Python IDLE
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Code :
StringOne = "www.codetheta.com"
print ("Memory address is:" ,id(StringOne))
Memory address is: 45121072
IDE Used To Test This Code : Python IDLE
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Post a Comment