let' try to write program to create list and numpy to store elements and try to check how much of space it occupies in memory examplelistsex py import time import sys =range( print(sys getsizeof( )*len( )output here getsizeof(function of sys object returns the space allocated for single value and len(function returns the number of element stores in the list so when we multiply sys getsizeof( )*len( ))it returns the total space allocated to the list numpyex py import numpy as np =np arange( print( size* itemsizeoutput herein numpy example size represents the size of an individual element and itemsize returns the total number of elements in numpy array so size* itemsize returns the total space allocated to the numpy array so you can see the list "soccupies bit of space for list size whereas for numpy of the same size occupies just bits of memory this proves that numpy is better compared to lists in terms of memory management how numpy is faster and more convenient than lists in terms of time let' try to understand this with an example where we try to add to the array of the element of length and find out the time taken to perform this task using lists and numpy array page