in some casesit is required to run through (or morelists at the same time python has handy function called zip for this purpose an example of how to use zip is provided in the code file_handling py below we should also briefly mention about tupleswhich are very much like liststhe main difference being that tuples cannot be changed to freshmanit may seem strange that such "constant listscould ever be preferable over lists howeverthe property of being constant is good safeguard against unintentional changes alsoit is quicker for python to handle data in tuple than in listwhich contributes to faster code with the data from abovewe may create tuple and print the content by writing ('hello' for in xprint ' element' print 'this was all the elements in the tuple xtrying insert or append for the tuple gives an error message (because it cannot be changed)stating that the tuple object has no such attribute reading from and writing to files input data for program often come from files and the results of the computations are often written to file to illustrate basic file handlingwe consider an example where we read and coordinates from two columns in fileapply function to the coordinatesand write the results to new two-column data file the first line of the input file is heading that we can just skipx and coordinates the relevant python lines for reading the numbers and writing out similar file are given in the file file_handling py filename 'tmp datinfile open(filename' 'open file for reading line infile readline(read first line read and coordinates from the file and store in lists [ [for line in infilewords line split(split line into words append(float(words[ ]) append(float(words[ ])infile close(