# print info about the longest line in a file def input_stats(filename): longest = "" for line in file(filename): if len(line) > len(longest): longest = line print "longest line = %d" % (len(longest)) print longest # main input_stats("carroll.txt")