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) This can be high if some of the strings are interned and get counted twice. But you're not likely to get closer without some knowledge of the data objects and where they come from. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list