title: How can I create multiple threads
body: <p>I am working on python 3 and my class is as below.</p>
  
  <pre><code>class MyClass():
       def values(self):
          ***values***
  
       i =0
       def check_values(self):
           for i in ValueList[i:i+1]:
                self.server_connect()
                new_value = self.update.values(i)
  
        def run(self):
            self.check_values()
  
  if __name__ == "__main__"
       format1 = "%(asctime)s: %(message)s"
       logging.basicConfig(format=format1, level=logging.INFO,
                          datefmt="%H:%M:%S")
  
       for i in range(4):
            thread = threading.Thread(target=MyClass().run())
            threads.append(thread)
            i += 1
            print("the %s thread is running", thread)
            thread.start()
  
  </code></pre>
  
  <p>There are no threads getting created but code works.
  I am not able to catch what I am doing wrong here.</p>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p>First, I would like to thank you for response and time given for the answer. 
  I have to update code and inherit other class as per new update from team as below.</p>
  
  <pre><code>class MyClass(MainServer):
  </code></pre>
  
  <p>Now, the server has it's own run function as below.</p>
  
  <pre><code>class MainServer(object):
     ***constructor***
     ***other functions ***
       def run(self):
           self.add_arguments()
           self.parse_arguments()
           self.check_values()
  </code></pre>
  
  <p>Now, without run(), my code is not properly running. 
  while including run() as below.</p>
  
  <pre><code>*** main ***
  update_perform = MyClass()
  for i range(4):
       thread = threading.Thread(target=Myclass().run()) &lt;-- code starts from here 
       threads.append(thread)
       i += 1
       print("the %s thread is running", thread)
       thread.start()    &lt;-- not reaching till here
  </code></pre>
  
  <p>As per my knowledge I will require thread.start() to start threading. So I have tried below option</p>
  
  <pre><code>class MyClass(MainServer):
       ***code as above***
     def check_values(self):
          self.server_authenticate()
          update_value = self.update.values()
  
      def run(self):
           self.server_connect()
           i = 0
           threads = list()
           for i in ValueList[i:i+1]:
               print("Updating the value = ", i)
               thread = threading.Thread(target=check_values(), args=[i])
               thread.start()
               i += 1
               print("Currently running thread", thread)
               threads.append(thread)
           for thread in threads:
                thread.join()
  </code></pre>
  
  <p>Here thread is executing from start and in print I can see as below</p>
  
  <pre><code>for threading :- 
  Currently running threads = &lt;Thread(Thread-8, stopped 14852)&gt;
  
  </code></pre>
  
  <p>But for the value I can see only one is in process as below</p>
  
  <pre><code>for value :- 
  Updating the value = 10  &lt;- first value 
  </code></pre>
  
  <p>So, now threads may be getting created but the values are not getting executed in parallel.</p>
  
  <p>Which I am not able to figure out.</p>