''' This program does this: opens a file, and counts the number of lines in the file prints the count ''' file_name = 'numbers.txt' handle = open(file_name, 'r') lines = handle.readlines() count = len(lines) print 'The file', file_name, 'has', count, 'lines'