Input will be inconsistent with newlines so I cannot use newlines as some sort of delimiter. The text coming in will be in the following format:
IDNumber FirstName LastName Score Letter Location
- IDNumber: 9 numbers
- Score: 0-100
- Letter: A or B
- Location: Could be anything from abbreviated State name to a City and State fully spelled out. This is optional.
Ex:
123456789 John Doe 90 A New York City 987654321
Jane Doe 70 B CAL 432167895 John
Cena 60 B FL 473829105 Donald Trump 70 E
098743215 Bernie Sanders 92 A AR
The elements would be:
123456789 John Doe 90 A New York City
987654321 Jane Doe 70 B CAL
432167895 John Cena 60 B FL
473829105 Donald Trump 70 E
098743215 Bernie Sanders 92 A AR
I need to individually access each element for each person. So for the John Cena object, I would need to be able to access the ID:432167895, the first name: John, the last name: Cena, the B or A: B. I don’t really need the location, but it will be part of the input.
Edit: It should be worth mentioning I am not allowed to import any modules such as regular expressions.