Python memory allocation for variables and objects

Python memory allocation for variables and objects
0

a1 = 7
a2 = 7
id(a1) == id(a2)
True

L1 = [1,2,3]
L2 = [1,2,3]
id(L1) == id(L2)
?

is it True or False? And why?

Hi @Vissu,
Hope you’ll get to understand the logic behind the answer for your question here : “Python Lists in Depth | Codementor” https://www.codementor.io/@sheena/python-lists-in-depth-lrtmk7w4q