python amount of memory for list code example Example: what takes more memory string or list python import sys sys.getsizeof(5) 24