I want to loop through a file and return every line:
for i in master_file:
columns = re.split('\s{2,}', i)
last_name = columns[1]
print(last_name)
If I replace print
with return
it will only return columns[1]
for the first line, but I want to return it for all the lines. So I can use that info elsewhere in my function.