In python write a function processpeople that takes the


Question :

In Python, write a function processPeople() that takes the name of a file as a parameter. Each line of the file corresponds to information about a person.

In particular a line contains either a name (in the form lastname,firstname with no spaces in it) or a name (lastname,firstname) and a year.

The function will process the file, creating a Person object for each line in the file.

The function will print information about each line as it processes it, as well as appending the new Person object into a list.

Make sure to use Person methods to display information rather than recreating the work you did for the first problem. Once the entire file has been processed, the function returns the list of Person objects created from the file.

If the file is empty, the function should return an empty list. If the input file cannot be opened, the function should print a message to that effect and then return an empty list.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: In python write a function processpeople that takes the
Reference No:- TGS02908451

Expected delivery within 24 Hours