On 04/02/2014 19:21, Dave Angel wrote:
Ayushi Dalmia <ayushidalmia2...@gmail.com> Wrote in message:
Where am I going wrong? What are the alternatives I can try?
You've rejected all the alternatives so far without showing your
code, or even properly specifying your problem.
To get the "total" size of a list of strings, try (untested):
a = sys.getsizeof (mylist )
for item in mylist:
a += sys.getsizeof (item)
The documentation for sys.getsizeof:
http://docs.python.org/dev/library/sys#sys.getsizeof
warns about the limitations of this function when applied to a
container, and even points to a recipe by Raymond Hettinger which
attempts to do a more complete job.
TJG
--
https://mail.python.org/mailman/listinfo/python-list