1 2 3 4 5 6 7 8
# -*- coding: utf-8 -*- import sys with open(sys.argv[1]) as f: for line in f: line = line.strip() if len(line) > 5: print line