测量Python中经过的时间? 在Python中,如何确定对象是否可迭代? 使用Python请求发布JSON 测量Python中经过的时间? 使用time模块 import time start = time.time() print("hello") end = time.time() print(end - start) Python3 import time t = time.process_time() #do some stuff elapsed_time = time.process_time() - t timeit模块 from timeit import default_timer as timer start = timer() # ... end = timer() print(end - start) # Time in seconds, e.g. 5.38091952400282 在Python中,如何确定对象是否可迭代? 使用Python请求发布JSON