Answers for "long operations to test speed python"

10

python time code

import time

t0 = time.time()
code_block
t1 = time.time()

total = t1-t0
Posted by: Guest on May-13-2020
0

optimized for loop in python

#Squaring all numbers in a list
l=[43,23,51,76,98]
map(lambda num:num**2,l)
Posted by: Guest on December-01-2020

Python Answers by Framework

Browse Popular Code Answers by Language