Python List functions do quite a job for simple tasks. Though I would recommend Numpy arrays if the application is required to be efficient. Go through the functions available to work on Python Lists from sys import getsizeof print ( "create list" ) a = [ 'a' , 'b' ] print ( a ) print ( "space allocated" ) print ( getsizeof ( a )) print ( getsizeof ( a [ 0 ])) print ( getsizeof ( a [ 1 ])) print ( "add element to list" ) a.append ( 'c' ) print ( a ) print ( "add element at a specific location" ) a.insert ( 1 , 'd' ) print ( a ) print ( "add list at the end of a list" ) print ( a+ [ 'e' , 'f' ]) a.extend ([ 'e' , 'f' ]) print ( a ) print ( "remove an element" ) ( a.remove ( 'e' )) if 'e' in a else ( print ( "not in list" )) print ( a ) print ( "index of an element using index func...
Project Weekay | Resume | LinkedIn Profile
NodeJS, AWS, MongoDB, ReactJS, Django, Python, ML with Scikit Learn, Matplotlib, Seaborn
Engineering, UX, Marketing, Product Designing, Business
sayhellotovinit@gmail.com | +91 99239 08880 | Pune, India