Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get size of list in python

list_1 = ["Hello", 1, "World", 2]
# if you want length of this lins use len() function
print(len(list_1))

# if you want size in bytes
import sys
print(sys.getsizeof(list_1), "Bytes")
Source by www.howtouselinux.com #
 
PREVIOUS NEXT
Tagged: #size #list #python
ADD COMMENT
Topic
Name
5+8 =