title: How do I get the time execution for each iteration? Python
body: <p>I have this code:</p>
  
  <pre><code>for times in range(50):
      factor = (min(getHeight(),getWidth()) / math.sqrt(qtdPosicoes)) * guess()
      positionInGrid = {}
      grid = np.zeros((getGridColumns(),getGridLines()))
      groupMatrix = np.zeros((grid.shape[0], grid.shape[1]))
      groups = getGroups(grid, listaComPosicoes, getXRanges(listaComPosicoes),getYRanges(listaComPosicoes))
      solution = calculaSilhueta()
      if bestSolution is None or solution &gt; bestSolution:
         bestSolution = solution
  </code></pre>
  
  <p>I found in the documentation time module but I did not understand how to use</p>