title: Python - execute for loop in multithreading
body: <p>I am new to python. for loop iterates element one by one. I want to know how to execute all the elements in the for loop at the same time.
  Here is my sample code:</p>
  
  <pre><code>import time
  def mt():
      for i in range(5):
          print (i)
          time.sleep(1)
  mt()
  </code></pre>
  
  <p>It prints the element one by one from for loop and wait 1 sec for next element. I want to know how to use multi-threading in for loop to print all the elements at the same time without waiting for next element</p>