input: Write a python function to measure the time taken to execute a given function.
  assert measure_time(lambda: [x**2 for x in range(1000)]) > 0
  assert measure_time(lambda: sum(range(100000))) > 0
  assert measure_time(lambda: [print('Hello World', i) for i in range(1000)]) > 0
output: import time
  
  def measure_time(func):
      start_time = time.time()
      func()
      end_time = time.time()
      return end_time - start_time