This is all in Python. Also, the names come from a .txt filethat i have created with 3 names on it(Jim,Pam,Dwight).
Main Function. Write a program where the userenters a name. Using the read function, check to see if the name isin the text document. If it is, respond back to the user the nameis found within the list.
Read Function. The read function should returnthe contents of the text document as a list.
EXAMPLE OUTPUT
Please enter a name: Jim
Jimis found in the list.
Enter another name (Y/N): Y
Please enter a name: Andy
Sorry, Andy was not found in the list. Would you like to add it?(Y/N): Y
Andrew has been added to the list.
Enter another name (Y/N): N
Write Function. The write function should takethe list and override the file with the new names list in reversealphabetical order with a hard return after each name.