title: How to measure time taken between lines of code in python?
body: <p>So in Java, we can do <a href="https://stackoverflow.com/questions/313893/how-to-measure-time-taken-by-a-function-to-execute">How to measure time taken by a function to execute</a></p>
  
  <p>But how is it done in python? To measure the time start and end time between lines of codes?
  Something that does this:</p>
  
  <pre><code>import some_time_library
  
  starttime = some_time_library.some_module()
  code_tobe_measured() 
  endtime = some_time_library.some_module()
  
  time_taken = endtime - starttime
  </code></pre>