I am writing this program and I want to round the time that gets printed off to the tens place.
from timeit import default_timer
start= default_timer()
#This is where i have a bunch of other code that isn't relavant
duration = default_timer()-start
print (duration)
I tried to use round(duration, 2) before I printed it and that didn't work. I just don't really know how to round it. There's probably a simple answer but I couldn't figure it out. Thanks!!