Question: Could someone help me write this function in Python? read_person: This function reads the data necessary from a text file to create and return a
Could someone help me write this function in Python?
read_person: This function reads the data necessary from a text file to create and return a Person instance. It takes one argument, a file object (not a filename). It reads a line from the file. If the line is empty, return False. Otherwise, use the contents of this and the next three lines as the first name, last name, birthday, and e-mail of a new Person, which you need to create and return. Use readline() method. This function allows one to traverse a file of Person objects, or perhaps Person objects with some other data interspersed, and read and create one Person object from it at a time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
