single line can be read from file with the readline(function infile open('inp'' 'line infile readline(it is often convenient to iterate over all the lines in file infile open('inp'' 'for line in infileprocess lines