Current location - Health Preservation Learning Network - Healthy weight loss - How to calculate python timetable?
How to calculate python timetable?
Python's timed list method:

Use the "import" statement to import the time package. Use the time.time function to get the current time before the list operation. After the list operation, use time.time to get the current time. Just subtract the first time from the second time.

Examples are as follows:

The implementation results are as follows:

For more Python knowledge, please pay attention to: Python self-study network! !