Is there anyway i can know how much bytes taken by particular variable in python. E.g; lets say i have
int = 12
You can find the functionality you are looking for here (in
sys.getsizeof - Python 2.6 and up).
Also: don't shadow the
import sys myint = 12 print sys.getsizeof(myint)