Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created August 30, 2021 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/289abe24490e509c779d4fa854d9ed0e to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/289abe24490e509c779d4fa854d9ed0e to your computer and use it in GitHub Desktop.
#modifying original_list
original_list.append(99)
print(original_list)
#Output:[1, 2, 3,99]
print(copied_list)
#Output:[1, 2, 3]
print(id(copied_list))
#Output:27799880
print(id(original_list))
#Output:27800264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment