#!/home/oracle/p3/bin/python import re import fileinput ifile = "1-3.txt" odir = "./unpack/" fc_cnt = sum(1 for line in fileinput.input(ifile)) with open(ifile) as f: fc = f.read().splitlines() i = 0 while i