dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Wednesday Dec 4th 2019 by Srinath M S
Article Image

Language: Web, Expertise: Intermediate - Learn how to use the getsizeof method to retrieve the size of an object in bytes.

Use getsizeof method to retrieve the size of an object in bytes. See below for an example:

str = "devx" 
print(sys.getsizeof(str))
Home
Mobile Site | Full Site