title: Use Python and BeautifulSoup to access title attribute of tags in web page
body: <p>I am new to Python and i am trying to retrieve all the titles from a particular url, but i am unable to do so. The code is getting compiled without any errors, but still i don't get the output.</p>
  
  <pre><code>import requests
  import sys
  from bs4 import BeautifulSoup
  
  def test_function(num):
      url = "https://www.zomato.com/chennai/restaurants?buffet=1&amp;page=" +       
      str(num)
      source_code = requests.get(url) 
      plain_text = source_code.text
      soup = BeautifulSoup(plain_text)
      for link in soup.findAll('title'):
          print(link)
  test_function(1)
  </code></pre>