I have got an existing menu that gives you options L or D. L should load the contents of a file and D should display it.<
If you want to work around that without adding extra lines and checks, one solution is to change your split to the following:
name, adult, child, garbage = (line+',,,').split(',', maxsplit=3)
This will silently ignore the missing values, and the variables will be empty. Meaning, the values for name, adult and child will be filled if they are there, and will be empty it the original file doesn't have them. For all intents and purposes, ignore the variable garbage.