title: NameError: name 'main' is not defined - indentation
body: <p>I am new to python and this question has been asked before</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/47492657/nameerror-name-is-not-defined">nameError name is not defined</a></li>
  <li><a href="https://stackoverflow.com/questions/20558934/nameerror-name-is-not-defined">NameError: name &#39;&#39; is not defined</a></li>
  <li><a href="https://stackoverflow.com/questions/38404491/nameerror-name-views-is-not-defined">NameError name &#39;Views&#39; is not defined</a></li>
  </ol>
  
  <p>but i have a different situation, this is my program</p>
  
  <pre><code>class student:    
      def address(self):
          print('address is mumbai')
  
      def contact(self):
          print('email : foo@yahoo.com')
  
      def main(self):
          _student=student()
          _student.address()
          _student.contact()    
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>i dont know if it is my indentation that is causing problem or it has something to do with the scope of the method</p>