What happens when we assign same values in two variables, is their address remains same? Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8 All Questions › Category: Python › What happens when we assign same values in two variables, is their address remains same? 0 Vote Up Vote Down chetan shidling asked 6 years ago I need short information. 2 Answers 0 Vote Up Vote Down chetan shidling answered 6 years ago Let’s see one example: >>> a = 10 >>> b = a >>> a 10 >>> b 10 >>> id(a) //To get address 1864841616 >>> id(b) 1864841616 The address is same because the value of both variables are same, that’s why python is called memory efficient. 0 Vote Up Vote Down Krishan answered 6 years ago Thank you so much