title: validating url and compiling working list of subreddits
body: <p>I am compiling the fortune 500 USA companies' list of all working links for subreddits.
  The code I am try is as bellow:</p>
  
  <p><strong>List of companies</strong></p>
  
  <pre class="lang-py prettyprint-override"><code>
  import pandas as pd
  import requests
  
  names=['Walmart', 'Exxon Mobil', 'Berkshire Hathaway', 'Apple', 'UnitedHealth Group', 'McKesson', 'CVS Health', 'Amazon.com', 'AT&amp;T', 'General Motors', 'Ford Motor',]
  
  a=[]
  
  
  
  for i in names:
      link="https://reddit.com/r/{}/".format(i)
      print(link)
      if requests.head(link).status_code==200:
      # if urllib.request.urlopen(link) is not None:
          print('working')
      else:
          a.append(i)
          print( "\nsite does not exist and copied to list")
  
  
  </code></pre>
  
  <p><strong>Problem</strong>
  Problem is that I am getting <code>else</code> portion only i.e <code>print( "\nsite does not exist and copied to list")</code> I'm not sure what I am doing wrong? it gives me 500 companies back without any single valid link.</p>
  
  <p><strong>Suggestion needed</strong>
  Is there any other good way to search the keyword form the list and compiling working links for subreddits?</p>