basic constructions list may also be created by simply writinge ['hello' giving list where [ contains the string hellox[ contains the integer etc we may add and/or delete elements anywhere in the list as shown in the following example ['hello' insert( - then becomes [- 'hello' del [ then becomes [- 'hello' append( then becomes [- 'hello' note the ways of writing the different operations here using append(will always increase the list at the end if you likeyou may create an empty list as [before you enter loop which appends element by element if you need to know the length of the listyou get the number of elements from len( )which in our case is after appending above this function is handy if you want to traverse all list elements by indexsince range(len( )gives you all legal indices note that there are many more operations on lists possible than shown here previouslywe saw how for loop may run over array elements when we want to do the same with list in pythonwe may do it as this little example showsx ['hello' for in xprint ' element' print 'this was all the elements in the list xthis is how it usually is done in pythonand we see that runs over the elements of directlyavoiding the need for indexing be awarehoweverthat when loops are written like thisyou can not change any element in by "changinge that iswriting + will not change anything in xsince can only be used to read (as opposed to overwritethe list elements there is special construct in python that allows you to run through all elements of listdo the same operation on eachand store the new elements in another list it is referred to as list comprehension and may be demonstrated as follows list_ [ list_ [ * for in list_ this will produce new list by the name list_ containing the elements and in that order notice the syntax within the brackets for list_ for in list_ signals that is to successively be each of the list elements in list_ and for each ecreate the next element in list_ by doing * more generallythe syntax may be written as list_ [ (efor in list_ where (emeans some expression involving