Question: in python and dont copy the answer from a similar question as it doesnt work. thanks! Question 6 Incomplete answer Mark 18.00 out of Write

in python and dont copy the answer from a similar question as it doesnt work. thanks!
Question 6 Incomplete answer Mark 18.00 out of Write a function find_host_in_file. The function will have 2 parameters, a file_name, and a hostname The file contains an email Id in each line eg. ioana.fleming@colorado.edu where ioana.fleming is the username and colorado.edu is the host 3000 The function should return a list of all the users in the file which have the hostname as the parameter passed The function should return a -1 if the file can't be opened. ?Rag question Use try-except for exception handling There might be empty lines in the file, or the email ID might have leading and trailing spaces. You should first parse the file and split each line and store it. Answer: (penalty regime 0 %)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
