hello I'm trying to slice one document and append it to another and i'm unsure as to what I'm doing #wrong. Please let me know what you think the problem is.
f = open("nameAddress.txt", "r")
g = open("name.txt", "a+")
line_count = 0
for line in f:
line_count += 1
for line in f:
firstSpace = line.find(' ')
newName = line(0, firstSpace)
g.write(newData)
f.close()
g.close()