There is something I am confused about and it is how I can store one line from a file and just use that one line, not all of the lines.
For example if I had a txt file:
3 4
happy maria
sad jake
angry honey
happy mary
where 3 represented the number of moods and 4 represents the number of people.
How would I then ONLY take 3 and 4 out of the file and store it so I could use it when I need it? For example numMood = 3
and numPeople = 4
I am not expecting anyone to code anything for me! I just am hoping someone could push me into the right direction or give me an idea.
Is the only way to store it into a dictionary and use the split()
function?