Skip to content

Instantly share code, notes, and snippets.

@ishashankkumar
Created November 16, 2019 10:03
Show Gist options
  • Save ishashankkumar/15d2a93f7ef2b6f1b801585b8af97e0a to your computer and use it in GitHub Desktop.
Save ishashankkumar/15d2a93f7ef2b6f1b801585b8af97e0a to your computer and use it in GitHub Desktop.
>>> d1, d2, d3 = {}, {"a":1, "b":2}, {"c":3, "d":4, "e":5} #dictionary
>>> d1.__sizeof__(), d2.__sizeof__(), d3.__sizeof__()
(248, 248, 248)
>>> l1, l2 = [], [1,2,3,4] #list
>>> l1.__sizeof__(), l2.__sizeof__()
(40, 72)
>>> t1, t2 = (), (1,2,3) #tuple
>>> t1.__sizeof__(), t2.__sizeof__(),
(24, 48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment