728x90

 

print("the required time: {:.2f}".format(time.time()-start))

studyforus.com/tipnknowhow/661111

 

[Python] 소수점 자리수의 출력 - round() vs format() - Study For Us

파이썬은 반올림을 하는 round() 함수를 내장하고 있습니다.그러나 round() 함수는 끝자리가 0이면 출력을 하지 않는 문제가 있습니다.예컨대 round(3.141592, 2)는 3.14를 출력하지만, round(3.101592, 2)는 3.1

studyforus.com

 

 

728x90

+ Recent posts