You can use sizeof operator to find it out.
You can either import getsizeof method from the sys module:
from sys import getsizeof
#Prints the sizeof the integer 20.
Objects should also have a magicmethod, might be discouraged from using, but works:
Remember that you would sometimes need parentheses, for example 20.__sizeof__() would result in errors, with variables this doesn't cause problems:
a = 20