Your
change it to
Edit: Take this in mind that although I have shown how to get each value back into the variables, the values are still strings and not numbers, int or float could be used to convert them back depending on what type of numbers are needed.
f.write('{}{}{}\n'.format(start_year, your_start_age, her_start_age))has not spaces between each {} so there is nothing to split on further down the code
change it to
f.write('{} {} {}\n'.format(startyear, yourstartage, herstartage))as shown in earlier code.
Edit: Take this in mind that although I have shown how to get each value back into the variables, the values are still strings and not numbers, int or float could be used to convert them back depending on what type of numbers are needed.