Skip to content

Instantly share code, notes, and snippets.

@ph87
Last active January 22, 2017 18:07
Show Gist options
  • Save ph87/e4f569dee834983ac701b9044e7fa6ea to your computer and use it in GitHub Desktop.
Save ph87/e4f569dee834983ac701b9044e7fa6ea to your computer and use it in GitHub Desktop.
import sys
data = {}
for i in xrange(0, 1000000):
lst.append(i)
size = sys.getsizeof(list)
if data.get(size):
pass
else:
data[size] = i
rev_data = {i[1]: i[0] for i in data.items()}
rows = sorted(rev_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment