Quote:File1:columnnames dataypes id int, name string
Quote:File2:column names dataypes date date, name string.
for name in os.listdir("C:\Python27"): if name.endswith(".column"): for file in name: file = os.path.join(name) joined = file+ "final" with open(joined,"w") as fout: filenames = glob.glob('*.column') for filename in filenames: with open(filename) as f1: for line in f1: file_names = glob.glob('*.datatypes') for filename in file_names: with open(filename) as f2: for line in f2: for line1,line2 in zip(f1,f2): x = ("{0} {1} \n".format(line1.rstrip(),line2.rstrip())) y = x.strip() fout.write(y.strip() + ',\n')
Quote:But i got the output: columnnames datatypes id int, name string, date date, name string I want in separe for each individula files. Please assist me.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)