lists can contain any kind of python objectincluding other listsas in the following examplea [ ,"dave", ["mark" [ , ]] items contained in nested lists are accessed by applying more than one indexing operationas followsa[ [ ][ [ ][ ][ returns "davereturns returns the program in listing illustrates few more advanced features of lists by reading list of numbers from file specified on the command line and outputting the minimum and maximum values listing advanced list features import sys load the sys module if len(sys argv! check number of command line arguments print "please supply filenameraise systemexit( open(sys argv[ ]filename on the command line lines readlines(read all lines into list close(convert all of the input values from strings to floats fvalues [float(linefor line in linesprint min and max values print "the minimum value is "min(fvaluesprint "the maximum value is "max(fvaluesthe first line of this program uses the import statement to load the sys module from the python library this module is being loaded in order to obtain command-line arguments the open(function uses filename that has been supplied as command-line option and placed in the list sys argv the readlines(method reads all the input lines into list of strings the expression [float(linefor line in linesconstructs new list by looping over all the strings in the list lines and applying the function float(to each element this particularly powerful method of constructing list is known as list comprehension because the lines in file can also be read using for loopthe program can be shortened by converting values using single statement like thisfvalues [float(linefor line in open(sys argv[ ])after the input lines have been converted into list of floating-point numbersthe built-in min(and max(functions compute the minimum and maximum values lib fl ff