title: Trying to pass list of variable in class and function in object oriented manner
body: <p>I'm trying to pass variable list in Class and Function in object oriented manner but facing some error, I don't understand what wrong with it and I'm using PyDev in Eclipse</p>
  <h1>CODE</h1>
  <pre><code>class Mydetails:
      __details = ''
  
      def __init__(self,details):     # constructor
          #self.__details['country'] = details['country']
          self.__details = details
  
      def set_element(self,details):
          self.__details = details
      
      def get_list(self,details):
          return self.__details
   
  details = ['ABC','DEF','GHI','JKL']
  pdetails = Mydetails()
  pdetails.set_element(details)
  print(pdetails.get_list())
  </code></pre>
  <h1>OUTPUT</h1>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\workspace\python\pythonapp\list.py&quot;, line 18, in &lt;module&gt;
      pdetails = Mydetails()
  TypeError: __init__() missing 1 required positional argument: 'details'
  </code></pre>