lists printing lists you can use the print function to print the entire contents of list [ , , print( [ data types valid listlists can contain all kinds of thingseven other lists for examplethe following is [ 'abc '[ , , ] similarities to strings there are number of things which work the same way for lists as for strings len -the number of items in is given by len(lin -the in operator tells you if list contains something here are some examplesif in lprint'your list contains the number 'if not in lprint'your list has no zeroes 'indexing and slicing -these work exactly as with strings for examplel[ is the first item of the list and [: gives the first three items index and count -these methods work the same as they do for strings and -the operator adds one list to the end of another the operator repeats list here are some examplesexpression result [ , ]+[ , , [ , , , , [ , ]* [ , , , , , [ ]* [ , , , , the last example is particularly useful for quickly creating list of zeroes looping -the same two types of loops that work for strings also work for lists both of the following examples print out the items of listone-by-oneon separate lines for in range(len( ))print( [ ]for item in lprint(itemthe left loop is useful for problems where you need to use the loop variable to keep track of where you are in the loop if that is not neededthen use the right loopas it is little simpler