I have 2 files i am trying to put together one has about 300 lines and the other has mabey 85.
I want to have the file with 85 to loop until it adds a line of text onto each of the other files lines. Here is my code i put together so far
name_file = open("names.txt", "r")
year_file = open("years.txt", "r")
for line in name_file:
print line.strip()+(year_file.readline())
Here are some examples of what the output looks like when it runs out of numbers
LLOYD1999
TOMMY2000
LEON2001
DEREK2002
WARREN2003
DARRELL2004
JEROME
FLOYD
LEO
I want it to output like this
LLOYD1999
LLOYD2000
LLOYD2001
LLOYD2002
LLOYD2003
LLOYD2004
TOMMY1999
TOMMY2000
TOMMY2001
TOMMY2002
TOMMY2003
TOMMY2004
ect...