Skip to content

Instantly share code, notes, and snippets.

Created July 26, 2020 00:27
What would you like to do?
#Copying x
#Both x[2] and y[2] (nested list in x and y) point to same list object in memory.
#both id are same
print (id(x[2]))#Output:17797480
print (id(y[2]))#Outpu:17797480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment