Last active
October 5, 2015 20:12
-
-
Save westover/32dbf30881b384fa6dd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import csv | |
import re | |
data0 = [] | |
target0 = [] | |
with open('first.file') as th: | |
temp = th.readlines() | |
data2= [line.strip() for line in temp] | |
with open('second.file', 'rb) as tk: | |
# skip the first two lines | |
tk.readline() | |
tk.readline() | |
reader = csv.reader(tk, delimiter=' ') | |
for i, row in enumerate(reader): | |
row.append(data2[i]) | |
data0.append(tuple(row)) | |
print data0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment