Skip to content

Instantly share code, notes, and snippets.

@edenau
Created January 18, 2020 21:39
Show Gist options
  • Save edenau/c2d659a66520844872045eb78c75e247 to your computer and use it in GitHub Desktop.
Save edenau/c2d659a66520844872045eb78c75e247 to your computer and use it in GitHub Desktop.
a = [[0,1],[2,3]]
b = a
b[1][1] = 100
print(a,b)
# [[0, 1], [2, 100]] [[0, 1], [2, 100]]
print(id(a)==id(b))
# True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment