I have an ELIF function to determine whether or not a website exists. The elif works, but is incredibly slow. I'd like to create a dictionary to apply the ELIF function to the list of URLs I have. Ideally I'm looking to get the outputs into a new table listing the URL and the result from the function.

I'm creating a dictionary for the potential outputs outlined in the elif statement posted below

```
check = {401:'web site exists, permission needed', 404:'web site does not exist'}

for row in df['sp_online']:
    r = requests.head(row)
    if r.status_code == 401:
        print ('web site exists, permission needed')
    elif r.status_code == 404:
        print('web site does  not exist')
else:
        print('other')

```

How can I get the results of the confirmation function to show each url's result as a new column in the dataframe?