user to select L for local file

Write a program that stores a local txt file name and a url for a remote txt file as a list. Prompt user to select L for local file, W for web file, or Q for quit. Add string function so that input can be lower case or upper case. Display user’s choice with a print statement and the previously created list value. Use the following import: import urllib.request If the user selects W for web, use the following code in a function to extract the data from a web server, the 2nd argument is the name of the file saved to your local directory: urllib.request.urlretrieve (“”, “anyName.txt”) Use the attached file to be used for the L choice as a local file. Program will read either file and produce two new files, one called boysnames.txt and girlsnames.txt separating the data for the boys and the girls. Tell the user the names of the file names that were produced. Print to the screen all of the names that are both boy and girl names such as “Jordan” Use at least 3 functions. Use exception handling for file opening and to ensure all files are closed properly.